ACMDM_STREAM_CONVERT

lParam1 = (LPARAM) pacmDSI  // see below
lParam2 = (LPARAM) pacmDSH  // see below
 

Sent to an Audio Compression Manager (ACM) driver to request a conversion on a previously opened conversion stream. This message is usually sent to an ACM driver in response to an acmStreamConvert call.

MMSYSERR_NOMEM Unable to allocate resources to perform the conversion request.
MMSYSERR_NOTENABLED The driver failed to load or initialize.

lParam1
Address of the ACMDRVSTREAMINSTANCE structure for the conversion stream that the convert request is for.
lParam2
Address of the ACMDRVSTREAMHEADER structure identifying the source and destination data blocks that should be used for the conversion.

An ACM driver must support the ACMDM_STREAM_CONVERT message if it supports the ACMDM_STREAM_OPEN message.

If the specified conversion stream was opened for asynchronous conversions, the driver should queue the ACMDRVSTREAMHEADER structure and immediately return successfully. If the stream header cannot be queued for asynchronous conversions (due to resource limitations, for example), the driver should return an error code.

If the ACMDRVSTREAMHEADER for an asynchronous conversion was successfully queued, but the driver later determines that the conversion is not possible, the driver must set the cbDstLengthUsed member of the ACMDRVSTREAMHEADER to zero and perform the DriverCallback.

Note that the following parameters for the ACMDM_STREAM_CONVERT message will be validated before calling the driver:

The driver does not need to check for these conditions.

The fdwConvert member of the ACMDRVSTREAMHEADER structure will contain flags defining how the conversion should be performed on this conversion request:

ACM_STREAMCONVERTF_BLOCKALIGN Specifies that only integral numbers of blocks should be converted. Converted data must end on block aligned boundaries. An application uses this flag for all conversions on a stream until there is not enough source data to convert to a block-aligned destination; in which case, the last conversion will be specified without this flag.
ACM_STREAMCONVERTF_END Specifies that the conversion stream should begin returning pending instance data. For example, if a conversion stream maintains instance data, such as the tail end of an echo filter operation, this flag should tell the driver to start returning this remaining data with optional source data. Note that this flag can be specified with the ACM_STREAMCONVERTF_START flag.
ACM_STREAMCONVERTF_START Specifies that the conversion stream should reinitialize its instance data. For example, if a conversion stream maintains instance data, such as delta or predictor information, this flag should reset the stream to starting defaults. Note that this flag can be specified with the ACM_STREAMCONVERTF_END flag.

See Also

ACMDM_STREAM_CLOSE, ACMDM_STREAM_OPEN, ACMDM_STREAM_PREPARE, ACMDM_STREAM_RESET, ACMDM_STREAM_SIZE, ACMDM_STREAM_UNPREPARE, ACMDRVOPENDESC, ACMDRVSTREAMHEADER, ACMDRVSTREAMINSTANCE, ACMDRVSTREAMSIZE