ACMDM_FORMAT_SUGGEST

The ACMDM_FORMAT_SUGGEST message requests an ACM driver to suggest a destination format for a conversion, given a specified source format.

Parameters

dwDriverID
Driver instance identifier. This is the value returned by the driver in response to the DRV_OPEN message.
hDriver
Driver handle.
uMsg
ACMDM_FORMAT_SUGGEST
lParam1
Pointer to an ACMDRVFORMATSUGGEST structure. (ACMDRVFORMATSUGGEST is defined in msacmdrv.h.)
lParam2
Not used.

Return Value

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. Possible error codes include:

Error Code

Meaning

MMSYSERR_NOTSUPPORTED

The driver does not support format suggestion operations.

ACMERR_NOTPOSSIBLE

The driver cannot suggest a destination format, based on the specified source format and restriction flags.

Comments

A client sends the ACMDM_FORMAT_SUGGEST message by calling the driver’s DriverProc entry point, passing the specified parameters. The ACM sends this message when an application calls the acmFormatSuggest function, which is described in the Win32 SDK.

All ACM drivers that provide stream conversions must support this message.

The ACMDRVFORMATSUGGEST structure 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 might specify values for some of the destination structure members, in order to restrict the possible suggestions. For more information, see the description of ACMDRVFORMATSUGGEST.

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 some destination format. If it can, it returns a description of that format in the destination WAVEFORMATEX structure.

Before calling the driver’s DriverProc function, the ACM verifies that: