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); }
public void Dispose() { if (_disposed) { return; } GC.SuppressFinalize(this); if (_preprocessor != IntPtr.Zero) { SpeexDspNativeMethods.speex_preprocess_state_destroy(_preprocessor); _preprocessor = IntPtr.Zero; } _disposed = true; }