private void button1_Click(object sender, EventArgs e)
        {
            if (button1.Text == "Start")
            {
                button1.Text = "Stop";
                comboBox1.Enabled = false;
                if (WaveNative.waveInGetNumDevs() == 0)
                {
                    textBox1.AppendText(DateTime.Now.ToString() + " : There are no audio devices available\r\n");
                }
                else
                {
                    if (_isPlayer == true)
                        _stream = new FifoStream();
                    _audioFrame = new AudioFrame(_isTest);
                    Start();
                }

            }
            else if(button1.Text == "Stop")
            {
                CompileData comp = new CompileData();
                double[] data = comp.compileMain(frequencies);
                if (comboBox1.Text == "Record Data")
                {
                    saveData();
                }
                else if (comboBox1.Text == "Identify Speaker")
                {
                    identifyUser();
                }
            }
        }
示例#2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     if (WaveNative.waveInGetNumDevs() == 0)
     {
         textBox1.AppendText(DateTime.Now.ToString() + " : There are no audio devices available\r\n");
     }
     else
     {
         if (_isPlayer == true)
         {
             _stream = new FifoStream();
         }
         _audioFrame = new AudioFrame(_isTest);
         Start();
     }
 }
示例#3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     if (WaveNative.waveInGetNumDevs() == 0)
     {
         textBox1.AppendText(DateTime.Now.ToString() + " : There are no audio devices available\r\n");
     }
     else
     {
         if (_isPlayer == true)
             _stream = new FifoStream();
         _audioFrame = new AudioFrame(_isTest);
         Start();
     }
 }