Пример #1
0
        public void Stop()
        {
            if (at != null)
            {
                try
                {
                    at.Disconnect();
                }
                finally
                {
                    at = null;
                }

                DisconnectedEvent(EventArgs.Empty);
            }
            if (m_Recorder != null)
            {
                try
                {
                    //matt note: dispose fails
                    m_Recorder.Dispose();
                }
                finally
                {
                    m_Recorder = null;
                }
            }
        }
Пример #2
0
 private void StopAudio()
 {
     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
 }
Пример #3
0
 /// <summary>
 /// Конец записи/воспроизведения звука
 /// </summary>
 public void Stop()
 {
     ThreadListen.Suspend();
     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();
 }
Пример #4
0
 public void Stop()
 {
     m_Recorder.Dispose();
     StopThread = true;
     cb.Dispose();
 }