Example #1
0
        public MainWindow()
        {
            InitializeComponent();

            asio = new AsioCS();
            asio.Init();

            backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
            backgroundWorker1.WorkerReportsProgress      = true;
            backgroundWorker1.WorkerSupportsCancellation = true;
            backgroundWorker1.DoWork             += new System.ComponentModel.DoWorkEventHandler(backgroundWorker1_DoWork);
            backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
            backgroundWorker1.ProgressChanged    += new ProgressChangedEventHandler(backgroundWorker1_ProgressChanged);

            textBoxOutputFilePath.Text = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) + "\\output.wav";
            m_uiInitialized            = true;
            UpdateUIStatus();

            buttonStop.IsEnabled  = false;
            buttonStart.IsEnabled = true;
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();

            asio = new AsioCS();
            asio.Init();
            int nDrivers = asio.DriverNumGet();

            Console.WriteLine("driverNum=" + nDrivers);
            for (int i = 0; i < nDrivers; ++i)
            {
                listBoxDrivers.Items.Add(asio.DriverNameGet(i));
            }
            if (0 < nDrivers)
            {
                listBoxDrivers.SelectedIndex = 0;
                buttonLoadDriver.Enabled     = true;
            }

            if (1 == nDrivers)
            {
                buttonLoadDriver_Click(null, null);
            }
        }