MMRESULT waveInAddBuffer(hWaveIn, lpWaveInHdr, wSize) | |||
HWAVEIN hWaveIn; | |||
LPWAVEHDR lpWaveInHdr; | |||
UINT wSize; |
The waveInAddBuffer function sends an input buffer to a waveform input device. When the buffer is filled, it is sent back to the application.
hWaveIn
Specifies a handle to the waveform input device.
lpWaveInHdr
Specifies a far pointer to a WAVEHDR structure that identifies the buffer.
wSize
Specifies the size of the WAVEHDR structure.
Returns zero if the function was successful. Otherwise, it returns an error number. Possible error returns are:
Value | Meaning |
MMSYSERR_INVALHANDLE | Specified device handle is invalid. |
WAVERR_UNPREPARED | lpWaveInHdr hasn't been prepared. |
MMSYSERR_HANDLEBUSY | The handle hWaveIn is in use on another thread. |
The data buffer must be prepared with waveInPrepareHeader before it is passed to waveInAddBuffer. The WAVEHDR data structure and the data buffer pointed to by its lpData field must be allocated with GlobalAlloc using the GMEM_MOVEABLE and GMEM_SHARE flags, and locked with GlobalLock.
waveInPrepareHeader