Ejemplo n.º 1
0
 private void Stop()
 {
     try
     {
         if (m_Player != null)
         {
             try
             {
                 m_Player.Dispose();
             }
             finally
             {
                 m_Player = null;
             }
         }
         if (m_Recorder != null)
         {
             try
             {
                 m_Recorder.Dispose();
             }
             finally
             {
                 m_Recorder = null;
             }
         }
         m_Fifo.Flush(); // clear all pending data
     }
     catch (Exception E)
     {
         MessageBox.Show(E.Message);
     }
 }
Ejemplo n.º 2
0
 private void BufferClear()
 {
     if (wavePlayer != null)
     {
         try
         {
             wavePlayer.Dispose();
         }
         finally
         {
             wavePlayer = null;
         }
     }
     if (waveRecorder != null)
     {
         try
         {
             waveRecorder.Dispose();
         }
         finally
         {
             waveRecorder = null;
         }
     }
     m_Fifo.Flush();
 }
Ejemplo n.º 3
0
 private void Stop()
 {
     if (m_Player != null)
     {
         try
         {
             m_Player.Dispose();
         }
         finally
         {
             m_Player = null;
         }
     }
     if (m_Recorder != null)
     {
         try
         {
             m_Recorder.Dispose();
         }
         finally
         {
             m_Recorder = null;
         }
     }
     m_Fifo.Flush(); // clear all pending data
 }
Ejemplo n.º 4
0
 private void Stop()
 {
     if (_recorder != null)
     {
         try
         {
             _recorder.Dispose();
         }
         catch { }
         finally
         {
             _recorder = null;
         }
     }
     if (_isPlayer == true)
     {
         if (_player != null)
         {
             try
             {
                 _player.Dispose();
             }
             catch { }
             finally
             {
                 _player = null;
             }
         }
         _streamOut.Flush(); // clear all pending data
     }
     consoletext += DateTime.Now.ToString() + " : Audio input device polling stopped\r\n";
 }
 public void Destroy()
 {
     if (player != null)
     {
         player.Dispose();
     }
 }
Ejemplo n.º 6
0
 private void Stop()
 {
     if (m_Player != null)
     {
         try { m_Player.Dispose(); }
         finally { m_Player = null; }
     }
 }
Ejemplo n.º 7
0
 public void Stop()
 {
     if (_player != null)
     {
         _player.Dispose();
         _player = null;
     }
 }
 public override void Stop()
 {
     Buffers.Clear();
     base.Stop();
     try
     {
         if (Player != null)
         {
             Player.Dispose();
         }
     }
     finally
     {
         Player = null;
     }
 }
Ejemplo n.º 9
0
        private void GetOutputDevices()
        {
            WaveOutPlayer wp = new WaveOutPlayer();

            uint dv = wp.GetDeviceCount();

            if (dv != 0)
            {
                string prod = "";
                for (uint x = 0; x < dv; x++)
                {
                    wp.GetOutputDeviceName(x, ref prod);
                    cbOutputDevices.Items.Add(prod);
                }
                cbOutputDevices.SelectedIndex = 0;
                wp.GetOutputDeviceName((uint)this.OutputDevice, ref prod);
                cbOutputDevices.Text = prod;
            }
            wp.Dispose();
        }