次の方法で共有


ACMDM_FORMAT_SUGGEST (Compact 2013)

3/26/2014

This message requests an ACM driver to choose a preferred destination format for a conversion with a specified source format.

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.
  • lParam1
    Pointer to an ACMDRVFORMATSUGGEST structure declared in the Msacmdrv.h header file.
  • lParam2
    Not used.

Return Values

A return value of 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 acmFormatSuggest function. All ACM drivers that provide stream conversions must support this message.

ACMDRVFORMATSUGGEST contains pointers to two WAVEFORMATEX structures. One of these structures describes the client-specified source format. The other structure is used by the driver to return a suggested destination format. The client may specify values for some of the destination structure members in order to restrict the possible suggestions.

Given the specified source format and destination restrictions, if any, the driver determines if it can provide a conversion from the specified source format to a particular destination format. If it can, it returns a description of that format in the destination WAVEFORMATEX structure.

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

  • The flag values contained in ACMDRVFORMATSUGGEST are valid.
  • The WAVEFORMATEX structure containing the source format description is readable.
  • The WAVEFORMATEX structure specified for receiving the suggested destination format description is writable.
  • The destination WAVEFORMATEX structure's size, contained in the cbwfxDst memberof ACMDRVFORMATSUGGEST, is large enough to receive a format structure for an appropriate destination format.

Requirements

Header

msacmdrv.h

See Also

Reference

ACM Driver Messages
ACMDRVFORMATSUGGEST
ACM_Open (ACM Driver)
ACM_IOControl