waveOutPrepareHeader function (mmeapi.h)
The waveOutPrepareHeader function prepares a waveform-audio data block for playback.
Handle to the waveform-audio output device.
Pointer to a WAVEHDR structure that identifies the data block to be prepared.
Size, in bytes, of the WAVEHDR structure.
Returns MMSYSERR_NOERROR if successful or an error otherwise. Possible error values include the following.
|Specified device handle is invalid.
|No device driver is present.
|Unable to allocate or lock memory.
Set the lpData, dwBufferLength, and dwFlags members of the WAVEHDR structure before calling this function. Set the dwFlags member to zero.
The dwFlags, dwBufferLength, and dwLoops members of the WAVEHDR structure can change between calls to this function and the waveOutWrite function. If you change the size specified by dwBufferLength before the call to waveOutWrite, the new value must be less than the prepared value.
If the method succeeds, the WHDR_PREPARED flag is set in the dwFlags member of the WAVEHDR structure.
Preparing a header that has already been prepared has no effect, and the function returns zero.
|Minimum supported client
|Windows 2000 Professional [desktop apps only]
|Minimum supported server
|Windows 2000 Server [desktop apps only]
|mmeapi.h (include Mmeapi.h, Windows.h)