次の方法で共有


ACMDM_STREAM_CONVERT (Compact 2013)

3/26/2014

This message requests an ACM driver to perform a conversion operation on a specified conversion stream.

Parameters

  • dwDeviceID
    Value that specifies a driver instance identifier. The driver returns this value in response to the ACM_Open (ACM Driver) function.
  • hDriver
    Handle to a driver.
  • uMsg
    Value that specifies this message.

Return Values

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

Remarks

The ACM (Waveapi.dll) sends this message by calling the ACM driver's ACM_IOControl entry point through the DeviceIoControl function. The ACM sends this message when an application calls the acmStreamConvert function. All ACM drivers that provide stream conversions must support this message.

The ACMDRVSTREAMINSTANCE structure received with this message is the same structure received with a previous ACMDM_STREAM_OPEN message. The driver does not need to validate the structure's contents again. ACMDRVSTREAMHEADER identifies the source and destination data buffers. The source buffer contains the data to be converted. The driver places converted data into the destination buffer. The driver must check the flags in the fdwConvert memberof ACMDRVSTREAMHEADER. These flags indicate how converted data should be returned.

Because stream conversions are time-critical operations, ACMDM_STREAM_CONVERT messages must be processed efficiently. The driver should perform as much processing as possible in response to the ACMDM_STREAM_OPEN message. If the driver supports asynchronous operations and the client has specified the ACM_STREAMOPENF_ASYNC flag, which is contained in the fdwOpen memberof ACMDRVSTREAMINSTANCE, the driver must take the following actions when it has finished converting the data in the source buffer:

  • Set the ACMSTREAMHEADER_STATUSF_DONE flagof ACMDRVSTREAMHEADER.
  • Send the client an MM_ACM_DONE callback message by calling the PostThreadMessage function.

Along with the padshNext member of ACMDRVSTREAMHEADER, asynchronous drivers can use the ACMSTREAMHEADER_STATUSF_INQUEUE flag of the structure to maintain a conversion queue of stream header structures.

Before calling the driver's ACM_IOControl function, the ACM should verify that the following conditions have been met:

  • The structure is readable, writable, and of the appropriate size.
  • The fdwConvert member of the structure contains valid flag values.
  • The structure's buffers have been prepared, and the specified buffer sizes are not larger than their prepared sizes.
  • The structure is not currently in an asynchronous driver's conversion queue; that is, the structure's ACMSTREAMHEADER_STATUSF_INQUEUE flag is not set.

Requirements

Header

msacmdrv.h

See Also

Reference

ACM Driver Messages
ACMDM_STREAM_PREPARE
ACM_Open (ACM Driver)
ACMDRVSTREAMINSTANCE
ACMDRVSTREAMHEADER
ACM_IOControl