public void StopRecording() { this._diskWriterRunning = false; if (this._diskWriter != null) { this._bufferEvent.Set(); this._diskWriter.Join(); } this.Flush(); this.FreeBuffers(); this._diskWriter = null; this._wavWriter = null; }
public void StartRecording() { if (this._diskWriter == null) { this._circularBufferHead = 0; this._circularBufferTail = 0; this._skippedBuffersCount = 0L; this._bufferEvent.Reset(); this._wavWriter = new SimpleWavWriter(this._fileName, this._wavSampleFormat, (uint)this._sampleRate); this._wavWriter.Open(); this._diskWriter = new Thread(this.DiskWriterThread); this._diskWriterRunning = true; this._diskWriter.Start(); } }
public void StopRecording() { _diskWriterRunning = false; if (_diskWriter != null) { _bufferEvent.Set(); _diskWriter.Join(); } Flush(); FreeBuffers(); _diskWriter = null; _wavWriter = null; }
public void StartRecording() { if (_diskWriter == null) { _circularBufferHead = 0; _circularBufferTail = 0; _skippedBuffersCount = 0; _bufferEvent.Reset(); _wavWriter = new SimpleWavWriter(_fileName, _wavSampleFormat, (uint)_sampleRate); _wavWriter.Open(); _diskWriter = new Thread(DiskWriterThread); _diskWriterRunning = true; _diskWriter.Start(); } }
public void StartRecording() { if (_diskWriter == null) { _circularBufferHead = 0; _circularBufferTail = 0; _skippedBuffersCount = 0; _bufferEvent.Reset(); _wavWriter = new SimpleWavWriter(_fileName, _wavSampleFormat, (uint) _sampleRate); _wavWriter.Open(); _diskWriter = new Thread(DiskWriterThread); _diskWriterRunning = true; _diskWriter.Start(); } }
public void StopRecording() { this._diskWriterRunning = false; if (this._diskWriter != null) { this._bufferEvent.Set(); this._diskWriter.Join(); } this.Flush(); this.FreeBuffers(); this._diskWriter = (Thread) null; this._wavWriter = (SimpleWavWriter) null; }
public void StartRecording() { if (this._diskWriter != null) return; this._circularBufferHead = 0; this._circularBufferTail = 0; this._skippedBuffersCount = 0L; this._bufferEvent.Reset(); this._wavWriter = new SimpleWavWriter(this._fileName, this._wavSampleFormat, (uint) this._sampleRate); this._wavWriter.Open(); this._diskWriter = new Thread(new ThreadStart(this.DiskWriterThread)); this._diskWriterRunning = true; this._diskWriter.Start(); }