Share via


WIDM_ADDBUFFER (Compact 2013)

3/26/2014

This message is used in an MMDRV_MESSAGE_PARAMS structure passed to the WAV_IOControl function to request a waveform input driver to add an empty input buffer to its input buffer queue.

Parameters

  • uDeviceId
    Device identifier - 0, 1, 2, and so on - for the target device.
  • uMsg
    Specifies this message.
  • dwUser
    Specifies a device instance identifier.
  • dwParam1
    Pointer to a WAVEHDR structure identifying the buffer.
  • dwParam2
    Size, in bytes, of WAVEHDR.

Return Values

MMSYSERR_NOERROR indicates success. Otherwise, the driver returns one of the MMSYSERR or WAVERR error values declared in the Mmsystem.h header file.

Remarks

The ACM (Waveapi.dll) sends the WIDM_ADDBUFFER message by calling the audio driver's WAV_IOControl entry point through the DeviceIoControl function.

If the WHDR_PREPARED flag is not set in the dwFlags member of WAVEHDR, the driver returns WAVERR_UNPREPARED. If the flag is set, the driver performs the following actions:

  • Clears the WHDR_DONE flag.
  • Sets the WHDR_INQUEUE flag.
  • Places the empty buffer in its input queue.
  • Returns with a value of MMSYSERR_NOERROR.

The driver starts recording when it receives a WIDM_START message. If the driver has already received a WIDM_START message and the input queue is empty, recording starts immediately.

Requirements

Header

mmddk.h

See Also

Reference

Waveform Input Driver Messages
WAV_IOControl
MMDRV_MESSAGE_PARAMS

Other Resources

WAVEHDR