The ACMDM_STREAM_PREPARE message requests an ACM driver to prepare the buffers associated with an ACMDRVSTREAMHEADER structure for use.
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.
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.