ACMDM_STREAM_PREPARE

The ACMDM_STREAM_PREPARE message requests an ACM driver to prepare the buffers associated with an ACMDRVSTREAMHEADER structure for use.

Parameters

dwDriverID
Driver instance identifier. This is the value returned by the driver in response to the DRV_OPEN message.
hDriver
Driver handle.
uMsg
ACMDM_STREAM_PREPARE
lParam1
Pointer to an ACMDRVSTREAMINSTANCE structure.
lParam2
Pointer to an ACMDRVSTREAMHEADER structure.

Return Value

The driver should return MMSYSERR_NOERROR if the operation succeeds. Otherwise it should return one of the MMSYSERR error codes defined in mmsystem.h, or one of the ACMERR error codes defined in msacm.h.

Comments

A client sends the ACMDM_STREAM_PREPARE message by calling the driver’s DriverProc entry point, passing the specified parameters. The ACM sends this message when an application calls the acmStreamPrepareHeader function, which is described in the Win32 SDK.

Support for this message is optional. If a driver supports ACMDM_STREAM_PREPARE, it must support ACMDM_STREAM_UNPREPARE.

If the driver returns MMSYSERR_NOTSUPPORTED, the ACM prepares the buffers for use. For most drivers, this behavior is sufficient. If the driver does perform buffer preparation, it should return MMSYSERR_NOERROR. In either case, the ACM sets ACMSTREAMHEADER_STATUSF_PREPARED in the ACMDRVSTREAMHEADER structure’s fdwStatus member. The driver never modifies this flag. (If you want both your driver and the ACM to perform buffer preparation operations, the driver should return MMSYSERR_NOTSUPPORTED after performing its preparation activity. The ACM can then also perform its preparation operation.)

Before calling the driver’s DriverProc function, the ACM verifies that:

For more information about the use of ACMDM_STREAM_PREPARE, see Converting Data Streams.