예제 #1
0
 /// <summary>
 /// Stop recording
 /// </summary>
 public void StopRecording()
 {
     recording = false;
     MmException.Try(WaveInterop.waveInStop(waveInHandle), "waveInStop");
     //MmException.Try(WaveInterop.waveInReset(waveInHandle), "waveInReset");
     // Don't actually close yet so we get the last buffer
 }
예제 #2
0
 /// <summary>
 /// Stop recording
 /// </summary>
 public void StopRecording()
 {
     //if (!recording)
     //    throw new InvalidOperationException("Not recording");
     recording = false;
     MmException.Try(WaveInterop.waveInStop(waveInHandle), "waveInStop");
     //MmException.Try(WaveInterop.waveInReset(waveInHandle), "waveInReset");
 }
예제 #3
0
 /// <summary>
 /// Stop recording
 /// </summary>
 public void StopRecording()
 {
     if (captureState != CaptureState.Stopped)
     {
         captureState = CaptureState.Stopping;
         callbackEvent.Set(); // signal the thread to exit
         MmException.Try(WaveInterop.waveInStop(waveInHandle), "waveInStop");
     }
 }
예제 #4
0
        /// <summary>
        /// Stop recording
        /// </summary>
        public void StopRecording()
        {
            if (captureState != CaptureState.Stopped)
            {
                captureState = CaptureState.Stopping;
                MmException.Try(WaveInterop.waveInStop(waveInHandle), "waveInStop");

                //Reset, triggering the buffers to be returned
                MmException.Try(WaveInterop.waveInReset(waveInHandle), "waveInReset");

                callbackEvent.Set(); // signal the thread to exit
            }
        }
예제 #5
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);
     }
 }
 /// <summary>
 /// Stop recording
 /// </summary>
 public void StopRecording()
 {
     if (recording)
     {
         recording = false;
         MmException.Try(WaveInterop.waveInStop(waveInHandle), "waveInStop");
         // report the last buffers, sometimes more than one, so taking care to report them in the right order
         for (int n = 0; n < buffers.Length; n++)
         {
             int index  = (n + lastReturnedBufferIndex + 1) % buffers.Length;
             var buffer = buffers[index];
             if (buffer.Done)
             {
                 RaiseDataAvailable(buffer);
             }
         }
         RaiseRecordingStopped(null);
     }
     //MmException.Try(WaveInterop.waveInReset(waveInHandle), "waveInReset");
     // Don't actually close yet so we get the last buffer
 }
예제 #7
0
 /// <summary>
 /// Stop recording
 /// </summary>
 public void StopRecording()
 {
     recording = false;
     this.callbackEvent.Set(); // signal the thread to exit
     MmException.Try(WaveInterop.waveInStop(waveInHandle), "waveInStop");
 }
예제 #8
0
파일: WaveInEvent.cs 프로젝트: h4ltYu/EOS
 public void StopRecording()
 {
     this.recording = false;
     this.callbackEvent.Set();
     MmException.Try(WaveInterop.waveInStop(this.waveInHandle), "waveInStop");
 }