waveOutPrepareHeader (Windows CE 5.0)
This function prepares a waveform data block for playback.
MMRESULT waveOutPrepareHeader(HWAVEOUThwo,LPWAVEHDRpwh,UINTcbwh );
Handle to the waveform-audio output device.
Pointer to a WAVEHDR structure that identifies the data block to be prepared. The buffer's base address must be aligned with the respect to the sample size.
Size, in bytes, of the WAVEHDR structure.
One of the values described in the following table is returned.
|MMSYSERR_INVALHANDLE||Specified device handle is invalid.|
|MMSYSERR_INVALPARAM||The buffer's base address is not aligned with the sample size.|
|MMSYSERR_NODRIVER||No device driver is present.|
|MMSYSERR_NOMEM||Unable to allocate or lock memory.|
The lpData, dwBufferLength, and dwFlags members of the WAVEHDR structure must be set before calling this function (dwFlags must be zero).
The dwFlags, dwBufferLength, and dwLoops members of the WAVEHDR structure can change between calls to this function and the waveOutWrite function. The only flags in the dwFlags member that you can change during this interval are WHDR_BEGINLOOP and WHDR_ENDLOOP. You can only change these flags as a matched pair; therefore, if you add or remove one of these flags, you must add or remove the other. If you change the size specified by dwBufferLength before the call to waveOutWrite, the new value must be less than the prepared value.
Preparing a header that has already been prepared has no effect, and the function returns zero.
OS Versions: Windows CE 2.0 and later.
Link Library: Coredll.lib.
Send Feedback on this topic to the authors