Exemplo n.º 1
0
        public void Dispose()
        {
            if (_waveWriter != null)
            {
                _waveWriter.Dispose();
                _waveWriter = null;
            }

            if (_notificationSource != null)
            {
                _notificationSource.Dispose();
                _notificationSource = null;
            }

            if (_waveSource != null)
            {
                _waveSource.Dispose();
                _waveSource = null;
            }

            if (_soundInSource != null)
            {
                _soundInSource.Dispose();
                _soundInSource = null;
            }

            if (_capture != null)
            {
                _capture.Dispose();
                _capture = null;
            }
        }
 //BLARG 01.14.2020: Added the rest of the disposables since we'll be calling this method a lot more
 public void Dispose()
 {
     //_capture?.Stop(); //Don't need this, Dispose() takes care of it
     _capture?.Dispose();
     _soundInSource?.Dispose();
     _source?.Dispose();
     _stream?.Dispose();
     _audioEndpointVolume?.Dispose();
 }
Exemplo n.º 3
0
        /*
         * Stop the audio capture, if currently recording. Properly disposes member objects.
         */
        private void StopCapture()
        {
            if (wasapiCapture.RecordingState == RecordingState.Recording)
            {
                wasapiCapture.Stop();

                finalSource.Dispose();
                notificationSource.Dispose();
                wasapiCapture.Dispose();

                SampleHandler = null;
            }
        }
Exemplo n.º 4
0
 public void Dispose()
 {
     notify.Dispose();
     LFW_instance = null;
     AudioDelegations.FftAcquired = null;
 }