Esempio n. 1
0
        private void init_event()
        {
            this.comboBox_input.SelectionChanged += (sender, e) => {
                ComboBox cur_cb = (ComboBox)sender;
                input_device = new AudioInputDevice(wave_data_model_input, env_device, cur_cb.SelectedIndex, comboBox_output.SelectedIndex);
            };

            this.comboBox_speaker.SelectionChanged += (sender, e) => {
                ComboBox cur_cb = (ComboBox)sender;
                env_device = new AudioOutputDevice(wave_data_model_env, cur_cb.SelectedIndex);
            };

            this.comboBox_output.SelectionChanged += (sender, e) => {
                ComboBox cur_cb = (ComboBox)sender;
                input_device = new AudioInputDevice(wave_data_model_input, env_device, comboBox_input.SelectedIndex, cur_cb.SelectedIndex);
            };

            this.button_start.Click += (sender, e) => {
                input_device.start();
                env_device.start();
            };

            this.button_stop.Click += (sender, e) => {
                input_device.stop();
                env_device.stop();
            };
        }
Esempio n. 2
0
        public MainWindow()
        {
            InitializeComponent();

            wave_data_model_env        = new WaveDataViewModel();
            env_device                 = new AudioOutputDevice(wave_data_model_env, 0);
            audio_env_grid.DataContext = wave_data_model_env;

            wave_data_model_input       = new WaveDataViewModel();
            input_device                = new AudioInputDevice(wave_data_model_input, env_device, 0, 0);
            audo_input_grid.DataContext = wave_data_model_input;

            init_event();
        }
Esempio n. 3
0
 private void init_audio_device()
 {
     AudioInputDevices       = AudioInputDevice.getInputDevices();
     AudioEnvironmentDevices = AudioOutputDevice.getOutputDevices();
     AudioOutputDevices      = AudioInputDevice.getOutputDevices();
 }