Exemple #1
0
        private void DeviceCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Driver != null)
            {
                Driver.ReleaseComAsioDriver();
                Driver = null;
            }

            //First item is "None" with 0 index
            if (deviceCombo.SelectedIndex > 0)
            {
                var currGuid = DevGuids[deviceCombo.SelectedIndex - 1];
                Driver = AsioDriver.GetAsioDriverByGuid(currGuid);

                //Limiting channel numeric by real channel number
                Driver.GetChannels(out int inputCh, out _);
                channelNumeric.Maximum = inputCh - 1;

                UpdateDriverInfo();
                InfoUpdTimer.Start();
            }
            else
            {
                DriverInfoLabel.Text = "None";
                InfoUpdTimer.Stop();
            }
        }
Exemple #2
0
 /// <summary>
 /// Release driver
 /// </summary>
 private void ReleaseDriver(AsioDriver driver)
 {
     driver.DisposeBuffers();
     driver.ReleaseComAsioDriver();
 }