Microsoft Windows CE 3.0  

Stopping, Pausing, and Restarting a Waveform Audio I/O Device

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

While recording or playing waveform audio, you might want to stop, pause, or restart the waveform audio I/O device. The following table shows the functions that control these capabilities.

Function Description
waveInReset Stops recording on a waveform audio input device and marks all pending data blocks as done
waveInStart Begins recording on a waveform audio input device
waveInStop Stops recording on a waveform audio input device
waveOutPause Pauses playback on a waveform audio output device
waveOutReset Stops playback on a waveform audio output device and marks all pending data blocks as done
waveOutRestart Resumes playback on a paused waveform audio output device

Generally, the waveform audio I/O device begins recording or playing as soon as the waveOutWriteor the waveInAddBufferfunction sends the first waveform audio data block.

To delay activation of waveform audio output

  1. Call the waveOutPausefunction to pause the waveform audio output device.
  2. Call the waveOutWritefunction.

    This sends the first data block to the waveform audio output device. However, the device is paused by the previous call to waveOutPause.

  3. Call the waveOutRestartfunction to begin playback.

    After the device begins playback, the device might not respond to waveOutPauseimmediately. Depending on the device driver, the device might finish playing the current data block before pausing.

    You also can delay activation of waveform audio input. Call the waveInAddBufferfunction as needed to allocate space for the audio input. The device will not begin recording until you call the waveInStartfunction.

    After the device stops recording or stops playback in response to a waveOutResetor waveInResetcommand, you cannot restart playback by using waveOutRestartor waveInStart. Instead, resume recording or playback by sending the next data block by using waveOutWriteor waveInAddBufferand waveInStart.



     Last updated on Tuesday, May 18, 2004

    © 2004 Microsoft Corporation. All rights reserved.