Beispiel #1
0
 /// <summary>
 /// Stops the player.
 /// </summary>
 public static void StopPlayer()
 {
     if (m_Player != null)
         try
         {
             m_Player.Dispose();
         }
         finally
         {
             m_Player = null;
         }
     m_Fifo.Flush();
 }
Beispiel #2
0
 /// <summary>
 /// Plays the recorder.
 /// </summary>
 public static void PlayRecorder()
 {
     StopRecorder();
     try
     {
         if (m_RecBuffer != null)
         {
             m_Fifo.Write(m_RecBuffer, 0, m_RecBuffer.Length);
             m_Player = new WaveOutPlayer(-1, fmt, m_RecBuffer.Length, 3,
                 new BufferFillEventHandler(Filler));
         }
     }
     catch
     {
         StopRecorder();
         throw;
     }
 }