Partager via


Stopping, Pausing, and Restarting a Waveform Audio I/O Device (Windows Embedded CE 6.0)

1/6/2010

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 waveOutWrite or the waveInAddBuffer function sends the first waveform audio data block.

To delay activation of waveform audio output

  1. Call the waveOutPause function to pause the waveform audio output device.

  2. Call the waveOutWrite function.

    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 waveOutRestart function to begin playback.

After the device begins playback, the device might not respond to waveOutPause immediately. 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 waveInAddBuffer function as needed to allocate space for the audio input. The device will not begin recording until you call the waveInStart function.

After the device stops recording or stops playback in response to a waveOutReset or waveInReset command, you cannot restart playback by using waveOutRestart or waveInStart. Instead, resume recording or playback by sending the next data block by using waveOutWrite or waveInAddBuffer and waveInStart.

See Also

Concepts

Playing Waveform Audio Files