waveInAddBuffer(3mms) — Subroutines
Name
waveInAddBuffer --- Send an input buffer to a waveform audio input device and return the filled buffer
Syntax
#include <mme/mme_api.h>
MMRESULT waveInAddBuffer (HWAVEIN hWaveIn,
LPWAVEHDR lpWaveInHdr,
UINT wSize);
Arguments
HWAVEIN hWaveIn
Specifies a handle to a waveform audio input device.
LPWAVEHDR lpWaveInHdr
Specifies a pointer to a WAVEHDR data structure that identifies the input buffer (lpWaveInHdr->lpData).
The WAVEHDR data structure must be allocated with the mmeAllocMem function and the input buffer must be allocated with the mmeAllocBuffer function before being passed to the waveInAddBuffer function.
See the mmeAllocMem(3mms) and mmeAllocBuffer(3mms) reference pages for more information about allocating memory for data structures and buffers.
UINT wSize
Specifies the size of the WAVEHDR data structure.
Description
The waveInAddBuffer function sends an input buffer to the specified waveform audio input device. When the buffer is filled, the function returns it to the calling program. This buffer is returned to the application via the callback defined in the waveInOpen 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 hWaveIn is in use on another thread. T} MMSYSERR_INVALHANDLE@T{ The specified device handle is invalid. T} WAVERR_UNPREPARED@T{ The lpWaveInHdr argument is not prepared. T}
See Also
None.