Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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();
     }
 }
Exemplo n.º 3
0
        public void StopRecording()
        {
            _diskWriterRunning = false;

            if (_diskWriter != null)
            {
                _bufferEvent.Set();
                _diskWriter.Join();
            }

            Flush();
            FreeBuffers();

            _diskWriter = null;
            _wavWriter  = null;
        }
Exemplo n.º 4
0
        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()
        {
            _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();
            }
        }
Exemplo n.º 7
0
 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;
 }
Exemplo n.º 8
0
 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();
 }