private void GetHosts() { comboAudioDriver1.Items.Clear(); comboAudioDriver2.Items.Clear(); comboAudioDriver3.Items.Clear(); int host_index = 0; foreach(string PAHostName in Audio.GetPAHosts()) { if(Audio.GetPAInputDevices(host_index).Count > 0 || Audio.GetPAOutputDevices(host_index).Count > 0) { comboAudioDriver1.Items.Add(new PADeviceInfo(PAHostName, host_index)); if (PAHostName != "Windows WASAPI" && PAHostName !="ASIO") { PADeviceInfo devinfo = new PADeviceInfo(PAHostName, host_index); comboAudioDriver2.Items.Add(devinfo); comboAudioDriver3.Items.Add(devinfo); dax_audio_setup_enum = true; } } host_index++; //Increment host index } if (!dax_audio_setup_enum) { chkAudioEnableVAC.Enabled = false; chkVAC2Enable.Enabled = false; console.DisableDAX(); } else { chkAudioEnableVAC.Enabled = true; console.EnableDAX(); } }
private void GetDevicesVAC() { try { PADeviceInfo loop = new PADeviceInfo("loop.dll", 0); comboAudioInputVAC.Items.Clear(); comboAudioOutputVAC.Items.Clear(); int host = ((PADeviceInfo)comboAudioDriverVAC.SelectedItem).Index; ArrayList a = Audio.GetPAInputdevices(host); foreach (PADeviceInfo p in a) comboAudioInputVAC.Items.Add(p); comboAudioInputVAC.Items.Add(loop); a = Audio.GetPAOutputdevices(host); foreach (PADeviceInfo p in a) comboAudioOutputVAC.Items.Add(p); comboAudioOutputVAC.Items.Add(loop); if (comboAudioInputVAC.Items.Count > 0) comboAudioInputVAC.SelectedIndex = 0; if (comboAudioOutputVAC.Items.Count > 0) comboAudioOutputVAC.SelectedIndex = 0; } catch (Exception ex) { Debug.Write(ex.ToString()); if (console.debug_enabled && !console.ConsoleClosing) console.Invoke(new DebugCallbackFunction(console.DebugCallback), "Audio get VAC devices error!\n" + ex.ToString()); } }