Exemplo n.º 1
0
 public void StopRecording()
 {
     if (!_isRecording)
     {
         return;
     }
     _isRecording = false;
     WaveSource.StopRecording();
 }
Exemplo n.º 2
0
        public void Dispose()
        {
            try
            {
                if (WaveSource != null)
                {
                    WaveSource.StopRecording();
                    WaveSource.Dispose();
                }

                if (WaveOutput != null)
                {
                    WaveOutput.Stop();
                    WaveOutput.Dispose();
                }

                if (DirectSoundOutput != null)
                {
                    DirectSoundOutput.Stop();
                    DirectSoundOutput.Dispose();
                }
            } catch (Exception) { }
        }
Exemplo n.º 3
0
 public void StopPassingThrough()
 {
     if (DateTime.Now <= LastPauseOrStart.AddMilliseconds(500))
     {
         return;
     }
     LastPauseOrStart = DateTime.Now;
     try
     {
         WaveSource.StopRecording();
         if (WaveOutput != null)
         {
             WaveOutput.Pause();
         }
         if (DirectSoundOutput != null)
         {
             DirectSoundOutput.Pause();
         }
         PassingThrough = false;
     }
     catch (Exception)
     {
     }
 }