public void LoadDevices() { DeviceOutBox.Items.Clear(); DeviceOutBox.Items.AddRange(SoundSystem.PopulateOutputDevices()); DeviceInBox.Items.Clear(); DeviceInBox.Items.AddRange(SoundSystem.PopulateInputDevices()); if (Config.CurrentConfig.CurrentOutputDevice >= DeviceOutBox.Items.Count) { Config.CurrentConfig.CurrentOutputDevice = DeviceOutBox.Items.Count - 1; } if (Config.CurrentConfig.CurrentInputDevice >= DeviceInBox.Items.Count) { Config.CurrentConfig.CurrentInputDevice = DeviceInBox.Items.Count - 1; } DeviceOutBox.SelectedIndex = Config.CurrentConfig.CurrentOutputDevice; DeviceInBox.SelectedIndex = Config.CurrentConfig.CurrentInputDevice; SoundSystem.resetListener(); }
public MainForm() { InitializeComponent(); _FILELOCK = false; _NEWLINES = Environment.NewLine + Environment.NewLine + Environment.NewLine + Environment.NewLine; btnList = new List <BindingButton>(); _currentForm = this; KeyListener._hookID = KeyListener.SetHook(KeyListener._proc); KeyListener._listenerEnabled = true; Overlay overlay = new Overlay(); overlay.UpdateBehaviorText(); RenderCanvas(); SoundSystem.PopulateOutputDevices(); Thread t = new Thread(SoundSystem.ContinuousInputPlayback); t.Start(); SoundSystem.InitializeStoppables(); }