Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

acmFormatSuggest function

The acmFormatSuggest function queries the ACM or a specified ACM driver to suggest a destination format for the supplied source format. For example, an application can use this function to determine one or more valid PCM formats to which a compressed format can be decompressed.

Syntax


MMRESULT acmFormatSuggest(
  HACMDRIVER had,
  LPWAVEFORMATEX pwfxSrc,
  LPWAVEFORMATEX pwfxDst,
  DWORD cbwfxDst,
  DWORD fdwSuggest
);

Parameters

had

Handle to an open instance of a driver to query for a suggested destination format. If this parameter is NULL, the ACM attempts to find the best driver to suggest a destination format.

pwfxSrc

Pointer to a WAVEFORMATEX structure that identifies the source format for which a destination format will be suggested by the ACM or specified driver.

pwfxDst

Pointer to a WAVEFORMATEX structure that will receive the suggested destination format for the pwfxSrc format. Depending on the fdwSuggest parameter, some members of the structure pointed to by pwfxDst may require initialization.

cbwfxDst

Size, in bytes, available for the destination format. The acmMetrics and acmFormatTagDetails functions can be used to determine the maximum size required for any format available for the specified driver (or for all installed ACM drivers).

fdwSuggest

Flags for matching the desired destination format. The following values are defined.

Value Meaning
ACM_FORMATSUGGESTF_NCHANNELSThe nChannels member of the structure pointed to by pwfxDst is valid. The ACM will query acceptable installed drivers that can suggest a destination format matching nChannels or fail.
ACM_FORMATSUGGESTF_NSAMPLESPERSECThe nSamplesPerSec member of the structure pointed to by pwfxDst is valid. The ACM will query acceptable installed drivers that can suggest a destination format matching nSamplesPerSec or fail.
ACM_FORMATSUGGESTF_WBITSPERSAMPLEThe wBitsPerSample member of the structure pointed to by pwfxDst is valid. The ACM will query acceptable installed drivers that can suggest a destination format matching wBitsPerSample or fail.
ACM_FORMATSUGGESTF_WFORMATTAGThe wFormatTag member of the structure pointed to by pwfxDst is valid. The ACM will query acceptable installed drivers that can suggest a destination format matching wFormatTag or fail.

 

Return value

Returns zero if successful or an error otherwise. Possible error values include the following.

Return codeDescription
MMSYSERR_INVALFLAG

At least one flag is invalid.

MMSYSERR_INVALHANDLE

The specified handle is invalid.

MMSYSERR_INVALPARAM

At least one parameter is invalid.

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Msacm.h

Library

Msacm32.lib

DLL

Msacm32.dll

See also

Audio Compression Manager
Audio Compression Functions

 

 

Community Additions

Show:
© 2014 Microsoft