public void Resume() { // // Sanity check // if (IsDisposed()) { throw new COMException("Instance has been Disposed", E_Unexpected); } m_pReader.Resume(); if (IntPtr.Zero != m_hWaveOut) { // // Resume the wave output device // int woe = waveOut.Restart(m_hWaveOut); waveOut.ThrowExceptionForError(woe); } }
private void TestControl() { m_read.Start(0, 50000000, 1.0f, IntPtr.Zero); while (m_SampleCount == 0) { System.Threading.Thread.Sleep(1); } m_read.Pause(); System.Threading.Thread.Sleep(100); int cur = m_SampleCount; System.Threading.Thread.Sleep(500); Debug.Assert(cur == m_SampleCount); m_read.Resume(); System.Threading.Thread.Sleep(100); Debug.Assert(m_SampleCount != cur); m_read.Stop(); WaitForStatus(Status.Stopped); }