Beispiel #1
0
            public void Reset()
            {
                if (_preprocessor != IntPtr.Zero)
                {
                    SpeexDspNativeMethods.speex_preprocess_state_destroy(_preprocessor);
                    _preprocessor = IntPtr.Zero;
                }

                _preprocessor = SpeexDspNativeMethods.speex_preprocess_state_init(_frameSize, _format.SampleRate);
            }
Beispiel #2
0
            public void Dispose()
            {
                if (_disposed)
                {
                    return;
                }

                GC.SuppressFinalize(this);

                if (_preprocessor != IntPtr.Zero)
                {
                    SpeexDspNativeMethods.speex_preprocess_state_destroy(_preprocessor);
                    _preprocessor = IntPtr.Zero;
                }

                _disposed = true;
            }