Exemplo n.º 1
0
 private void frmMain_Load(object sender, EventArgs e)
 {
     if (AudioTests.MicrophoneAvailableTest(0))
     {
         waveIn = new WaveIn();
         waveIn.StartRecording();
         waveIn.WaveFormat     = new WaveFormat(4100, 16, 1); // rate, bits, channels
         waveIn.DataAvailable += new EventHandler <WaveInEventArgs>(wi_DataAvailable);
         timer1.Enabled        = true;
     }
     btnTest1.BackColor = (AudioTests.MicrophoneAvailableTest(0) ? Color.Green : Color.Red);
 }
Exemplo n.º 2
0
 private void btnTest1_Click(object sender, EventArgs e)
 {
     btnTest1.BackColor = (AudioTests.MicrophoneAvailableTest(0) ? Color.Green : Color.Red);
 }