public bool ListenToMicrophone(int selectedDevice, int groupBoxIndex) { MicrophoneConstruct mic = microphones[selectedDevice]; mic.startListening(); activeMicrophones[groupBoxIndex - 1] = mic; TryGetVolumeControl(selectedDevice, groupBoxIndex); return(mic.Active); }
public List<MicrophoneConstruct> MicrophoneList() { int WaveInDevices = WaveIn.DeviceCount; microphones = new List<MicrophoneConstruct>(); for (int WaveInDevice = 0; WaveInDevice < WaveInDevices; WaveInDevice++) { MicrophoneConstruct deviceInfo = new MicrophoneConstruct(WaveInDevice); deviceInfo.aggregator.MaximumCalculated += MaximimumCalculated; microphones.Add(deviceInfo); } return microphones; }
public List <MicrophoneConstruct> MicrophoneList() { int WaveInDevices = WaveIn.DeviceCount; microphones = new List <MicrophoneConstruct>(); for (int WaveInDevice = 0; WaveInDevice < WaveInDevices; WaveInDevice++) { MicrophoneConstruct deviceInfo = new MicrophoneConstruct(WaveInDevice); deviceInfo.aggregator.MaximumCalculated += MaximimumCalculated; microphones.Add(deviceInfo); } return(microphones); }
private void Microphone2_ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { try { if (((ComboBox)sender).SelectedIndex > -1) { if (mic2PrevVal != null) service.stopRecording(mic2PrevVal); bool active = service.ListenToMicrophone(((ComboBox)sender).SelectedIndex, 2); Mic2_Rec.IsEnabled = true; } mic2PrevVal = (MicrophoneConstruct)((ComboBox)sender).SelectedValue; } catch (Exception Ex) { Xceed.Wpf.Toolkit.MessageBox.Show(Ex.Message); Microphone2_ComboBox.SelectedIndex = -1; } }
internal void StopRecording(MicrophoneConstruct i) { i.stopListening(); }
internal void StartRecording(MicrophoneConstruct i) { i.createAudioRecord(); }
public void stopRecording(MicrophoneConstruct i) { microphones.StopRecording(i); }
public void startRecording(MicrophoneConstruct i) { //try { microphones.StartRecording(i); //port.PingBiopac(); //} //catch (Exception ex) //{ // throw ex; //} }
public MicItem( MicrophoneConstruct mic) { this.mic = mic; }