waveOutWrite(3mms) — Subroutines
Name
waveOutWrite --- Send a data block to the specified waveform audio output device
Syntax
#include <mme/mme_api.h>
MMRESULT waveOutWrite(HWAVEOUT hWaveOut,
LPWAVEHDR lpWaveOutHdr,
UINT uSize);
Arguments
HWAVEOUT hWaveOut
Specifies a handle to a waveform audio output device.
LPWAVEHDR lpWaveOutHdr
Specifies a pointer to a WAVEHDR data structure that contains information about the data block.
The WAVEHDR data structure must be allocated with the mmeAllocMem function before being passed to the waveOutWrite function.
See the mmeAllocMem(3mms) reference page for more information about allocating memory for data structures.
UINT uSize
Specifies the size of the WAVEHDR data structure.
Description
The waveOutWrite function sends a data block to the specified waveform audio output device. Unless the device is paused by calling the waveOutPause function, playback begins when the first data block is sent to the device. This buffer is returned to the application via the callback defined in the waveOutOpen function.
Extensions
None.
Return Values
Returns MMSYSERR_NOERROR if the function is successful; otherwise, it returns one of the following error codes:
MMSYSERR_HANDLEBUSY@T{ The handle hWaveOut is in use on another thread. T} MMSYSERR_INVALHANDLE@T{ The specified device handle is invalid. T} MMSYSERR_UNPREPARED@T{ The lpWaveOutHdr argument is not prepared. T}
See Also
waveOutPause(3mms), waveOutReset(3mms), waveOutRestart(3mms)