Playing Waveform Audio Files

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

After opening a waveform audio output device driver successfully and preparing the header file, you can begin playing a sound. Windows provides the waveOutWrite and waveInAddBuffer functions for sending data blocks to a waveform audio output device.

Use the WAVEHDR structure to specify the waveform audio data block that you are sending by using the waveOutWrite or waveInAddBuffer function. This structure contains a pointer to a locked data block, the length of the data block, and some flags. After you send a data block to an output device, wait until the device driver is finished with the data block before you free it. If you are sending multiple data blocks, monitor the completion of data blocks to know when to send additional blocks.

Note

Unless the waveform audio input and output data is contained in a single data block, an application must supply the device driver with data blocks continually until recording or playback is complete.

The following topics contain additional information about playing waveform audio files.

See Also

Concepts

Using the Waveform Audio Interface