See also ACMDM_STREAM_CLOSE, ACMDM_STREAM_CONVERT, ACMDM_STREAM_OPEN, ACMDM_STREAM_RESET, ACMDM_STREAM_SIZE, ACMDM_STREAM_UNPREPARE, ACMDRVOPENDESC, ACMDRVSTREAMHEADER, ACMDRVSTREAMINSTANCE, ACMDRVSTREAMSIZE
lParam1 = (LPARAM) pacmDSI // see below lParam2 = (LPARAM) pacmDSH // see below
Sent to an Audio Compression Manager (ACM) driver to allow the driver to optionally prepare an ACMDRVSTREAMHEADER structure and corresponding data blocks for a conversion. This message is usually sent to an ACM driver in response to an acmStreamPrepareHeader call.
MMSYSERR_NOMEM | Unable to allocate resources to prepare the stream header and conversion buffers. |
MMSYSERR_NOTENABLED | The driver failed to load or initialize. |
MMSYSERR_NOTSUPPORTED | The driver does not support this message. |
lParam1
Address of the ACMDRVSTREAMINSTANCE structure for the conversion stream that the prepare request is for.
lParam2
Address of the ACMDRVSTREAMHEADER structure identifying the source and destination data blocks that will be used in subsequent conversions.
An ACM driver can optionally support the ACMDM_STREAM_PREPARE message if special preparations for a stream header and buffers are required. If a driver supports the ACMDM_STREAM_PREPARE message, it must also support the ACMDM_STREAM_UNPREPARE message.
The default response for the ACMDM_STREAM_PREPARE message is to return MMSYSERR_NOTSUPPORTED. In this case, the ACM will mark the stream header as being prepared (sets the ACMSTREAMHEADER_STATUSF_PREPARED flag in the fdwStatus member of the ACMDRVSTREAMHEADER structure).
If a driver requires other operations to prepare the header and data blocks for a conversion, it should perform these operations and return MMSYSERR_NOERROR. The ACM will then mark the stream header as being prepared (a driver should never modify the ACMSTREAMHEADER_STATUSF_PREPARED flag in the fdwStatus member of the ACMDRVSTREAMHEADER structure). If the required operations cannot be performed, an error other than MMSYSERR_NOTSUPPORTED should be returned (for example, MMSYSERR_NOMEM if resource allocation is a problem).
The ACM will always send the ACMDM_STREAM_PREPARE and ACMDM_STREAM_UNPREPARE messages to a driver even if the driver returns MMSYSERR_NOTSUPPORTED. This allows a driver to optionally perform minor preparations for the header and data buffers while still taking advantage of the default behavior performed by the ACM.
Note that the following parameters for the ACMDM_STREAM_PREPARE message will be validated before calling the driver:
The driver does not need to check for these conditions.