示例#1
0
 private void inputSamplerateBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Config.CurrentConfig.InputSampleRate.ToString() != inputSamplerateBox.Items[inputSamplerateBox.SelectedIndex].ToString())
     {
         Config.CurrentConfig.InputSampleRate = Convert.ToInt32(inputSamplerateBox.Items[inputSamplerateBox.SelectedIndex]);
         SoundSystem.resetListener();
     }
 }
示例#2
0
 private void inputChannelsBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Config.CurrentConfig.InputChannels != inputChannelsBox.SelectedIndex + 1)
     {
         Config.CurrentConfig.InputChannels = inputChannelsBox.SelectedIndex + 1;
         SoundSystem.resetListener();
     }
 }
示例#3
0
        //EventHandler for choosing a device in DeviceBox
        private void SetInputDeviceNumber(object o, EventArgs e)
        {
            ComboBox cb = (ComboBox)o;

            if (Config.CurrentConfig.CurrentInputDevice != cb.SelectedIndex)
            {
                Config.CurrentConfig.CurrentInputDevice = cb.SelectedIndex;
                SoundSystem.resetListener();
            }
        }
示例#4
0
        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();
        }