Windows Media Audio Decoder

The Windows Media Audio decoder decodes audio streams that were encoded by the Windows Media Audio Encoder. The encoder and decoder support three categories of encoded audio: Windows Media Audio Standard, Windows Media Audio Professional, and Windows Media Audio Lossless.

Class Identifier

The class identifier (CLSID) for the Windows Media Audio decoder is represented by the constant CLSID_CWMADecMediaObject. You can create an instance of the audio decoder by calling CoCreateInstance.

Input Formats

The following table shows the audio format tags that represent the input categories supported by the Windows Media Audio decoder. For information about how to set the input and output types for the decoder, see Configuring Audio Decoding.

Format tag constant Format tag value Audio format
WAVE_FORMAT_WMAUDIO2 0x0161 Windows Media Audio Standard
WAVE_FORMAT_WMAUDIO3 0x0162 Windows Media Audio Professional
WAVE_FORMAT_WMAUDIO_LOSSLESS 0x0163 Windows Media Audio Lossless

 

Output Formats

The following table shows the audio format tags that represent the output types supported by the Windows Media Audio Decoder. For information about how to set the input and output types for the decoder, see Configuring Audio Encoding.

Format tag constant Format tag value Audio format
WAVE_FORMAT_PCM 0x0001 PCM format
WAVE_FORMAT_IEEE_FLOAT 0x0003 IEEE floating point
WAVE_FORMAT_EXTENSIBLE 0xFFFE PCM/IEEE format in WAVEFORMATEXTENSIBLE structure

 

Interfaces

An audio decoder object exposes the IMediaObject interface so that the object can be used as a DirectX Media Object (DMO), and it exposes the IMFTransform interface so that the object can be used as a Media Foundation Transform (MFT).

A Windows Media Audio decoder behaves as a DMO or an MFT depending on which interfaces you obtain and which version of Windows is running. The following table shows the conditions under which an audio decoder behaves as a DMO or an MFT.

Operating system Decoder behavior
Windows XP A Windows Media Audio decoder always behaves as a DMO.
Windows Vista By default, a Windows Media Audio decoder behaves as a DMO. If you obtain an IMFTransform interface or an IPropertyStore interface on an audio decoder, it behaves as an MFT.
Windows 7 By default, a Windows Media Audio decoder behaves as a DMO. If you obtain an IMFTransform interface on an audio decoder, it behaves as an MFT.

 

Properties

The Windows Media Audio decoder supports the following properties.

Property Description
MFPKEY_Decoder_MaxNumPCMSamplesWithPaddedSilence Specifies the maximum number of additional PCM samples that might be returned at the end of decoding a file.
Windows Vista and later.
Standard, Professional, Lossless.
Read-only.
MFPKEY_WMADEC_DRCMODE Specifies the dynamic-range control mode that the audio decoder will use.
Windows XP and later.
Standard, Professional, Lossless.
Write-only.
MFPKEY_WMADEC_FOLDDOWN_MATRIX Specifies the author-supplied fold-down coefficients for decoding multichannel audio for fewer channels than the encoded stream contains.
Windows XP and later.
Professional
Write-only.
MFPKEY_WMADEC_HIRESOUTPUT Specifies whether the audio decoder should deliver high-resolution output.
Windows XP and later.
Professional, Lossless.
Write-only.
MFPKEY_WMADEC_LTRTOUTPUT Specifies whether the audio decoder should perform Lt-Rt fold down.
Windows Vista and later.
Professional.
Write-only.
MFPKEY_WMADEC_SPKRCFG Specifies the speaker configuration on the client computer.
Windows XP and later.
Professional.
Write-only.
MFPKEY_WMADRC_AVGREF Specifies the average volume level of audio content.
Windows XP and later.
Professional, Lossless.
Read/write.
MFPKEY_WMADRC_AVGTARGET Specifies the desired average volume level of output audio content.
Windows XP and later.
Professional, Lossless.
Write-only.
MFPKEY_WMADRC_PEAKREF Specifies the highest volume level occurring in audio content.
Windows XP and later.
Professional, Lossless.
Read/write.
MFPKEY_WMADRC_PEAKTARGET Specifies the desired maximum volume level of output audio content.
Windows XP and later.
Professional, Lossless.
Write-only.

 

Requirements

Requirement Value
Client
Windows XP, Windows Vista or Windows 7
Header
Wmcodecdsp.h
DLL
Wmadmod.dll

See also

Codec Objects

Codec Implementation