waveOutPrepareHeader (Windows CE 5.0)

Send Feedback

This function prepares a waveform data block for playback.

MMRESULT waveOutPrepareHeader(HWAVEOUThwo,LPWAVEHDRpwh,UINTcbwh );

Parameters

  • hwo
    Handle to the waveform-audio output device.
  • pwh
    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.
  • cbwh
    Size, in bytes, of the WAVEHDR structure.

Return Values

One of the values described in the following table is returned.

Value Description
MMSYSERR_NOERROR Success.
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.

Remarks

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.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Mmsystem.h.
Link Library: Coredll.lib.

See Also

Waveform Audio Functions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.