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.
A version of this page is also available for
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 waveOutWriteand waveInAddBufferfunctions for sending data blocks to a waveform audio output device.

Use the WAVEHDRstructure to specify the waveform audio data block that you are sending by using the waveOutWriteor waveInAddBufferfunction. 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