Example #1
0
 public void StopRecording()
 {
     if (this.recording)
     {
         this.recording = false;
         MmException.Try(WaveInterop.waveInStop(this.waveInHandle), "waveInStop");
         for (int i = 0; i < this.buffers.Length; i++)
         {
             int          num          = (i + this.lastReturnedBufferIndex + 1) % this.buffers.Length;
             WaveInBuffer waveInBuffer = this.buffers[num];
             if (waveInBuffer.Done)
             {
                 this.RaiseDataAvailable(waveInBuffer);
             }
         }
         this.RaiseRecordingStopped(null);
     }
 }
Example #2
0
 public void StopRecording()
 {
     this.recording = false;
     this.callbackEvent.Set();
     MmException.Try(WaveInterop.waveInStop(this.waveInHandle), "waveInStop");
 }