typedef struct wavehdr_tag {
LPSTR lpData;
DWORD dwBufferLength;
DWORD dwBytesRecorded;
DWORD dwUser;
DWORD dwFlags;
DWORD dwLoops;
struct wavehdr_tag far * lpNext;
DWORD reserved;
} WAVEHDR;
The WAVEHDR structure defines the header used to identify a waveform data buffer.
WHDR_DONE | Set by the device driver to indicate that it is finished with the data buffer and is returning it to the application. |
WHDR_BEGINLOOP | Specifies that this buffer is the first buffer in a loop. This flag is only used with output data buffers. |
WHDR_ENDLOOP | Specifies that this buffer is the last buffer in a loop. This flag is only used with output data buffers. |
WHDR_PREPARED | Set by the device driver to indicate that the data buffer has been prepared with waveInPrepareHeader or waveOutPrepareHeader. |
WHDR_INQUEUE | Set by the device driver to indicate that the data buffer is queued for playback. |
Use the WHDR_BEGINLOOP and WHDR_ENDLOOP flags in the dwFlags field to specify the beginning and ending data blocks for looping. To loop on a single block, specify both flags for the same block. Use the dwLoops field in the WAVEHDR structure for the first block in the loop to specify the number of times to play the loop.