/// <summary> /// Create an instance of the recording class /// </summary> /// <param name="iDevice">Index of the device to record from (see GetDevices)</param> public CWaveRecord(int iDevice) { m_Disposed = false; m_iDevice = iDevice; m_Delegate = new waveIn.WaveInDelegate(WaveInProc); m_Sample = new AutoResetEvent(false); m_ProcReady = new AutoResetEvent(false); }
public void Dispose() { m_Disposed = true; if (!m_Disposed) { Close(); GC.SuppressFinalize(this); m_Delegate = null; m_wfe = null; if (m_ProcReady != null) { m_ProcReady.Close(); m_ProcReady = null; } if (m_Sample != null) { m_Sample.Close(); m_Sample = null; } } }