Beispiel #1
0
        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;
        }
Beispiel #3
0
        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();
 }
Beispiel #7
0
 public void stopRecording(MicrophoneConstruct i)
 {
     microphones.StopRecording(i);
 }
Beispiel #8
0
 public void startRecording(MicrophoneConstruct i)
 {
     //try {
         microphones.StartRecording(i);
         //port.PingBiopac();
     //}
     //catch (Exception ex)
     //{
     //    throw ex;
     //}
 }
 public MicItem( MicrophoneConstruct mic)
 {
     this.mic = mic;
 }
Beispiel #10
0
 internal void StopRecording(MicrophoneConstruct i)
 {
     i.stopListening();
 }
Beispiel #11
0
 internal void StartRecording(MicrophoneConstruct i)
 {
     i.createAudioRecord();
 }