Windows Media Audio Encoder
The Windows Media Audio encoder encodes audio streams. The encoder supports three categories of encoded output: Windows Media Audio Standard, Windows Media Audio Professional, and Windows Media Audio Lossless.
Class Identifier
The class identifier (CLSID) for the Windows Media Audio Encoder is represented by the constant CLSID_CWMAEncMediaObject. You can create an instance of the audio encoder by calling CoCreateInstance.
Input Formats
The following table shows the audio format tags that represent the input categories supported by the Windows Media Audio encoder. For information about how to set the input and output types for the encoder, 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 |
Output Formats
The following table shows the audio format tags that represent the output categories supported by the Windows Media Audio encoder.
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 |
Interfaces
An audio endoder 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 encoder 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 encoder behaves as a DMO or an MFT.
Operating system | Encoder behavior |
---|---|
Windows XP | A Windows Media Audio encoder always behaves as a DMO. |
Windows Vista | By default, a Windows Media Audio encoder behaves as a DMO. If you obtain an IMFTransform interface or an IPropertyStore interface on an audio encoder, it behaves as an MFT. |
Windows 7 | By default, a Windows Media Audio encoder behaves as a DMO. If you obtain an IMFTransform interface on an audio encoder, it behaves as an MFT. |
Encoder Properties
The Windows Media Audio encoder supports the following properties.
Property | Description |
---|---|
MFPKEY_AVGCONSTRAINED | Specifies whether the encoder uses average-controllable VBR encoding.
Standard, Professional, Lossless. Read/write. |
MFPKEY_BMAX | Specifies the buffer window, in milliseconds, of a constrained variable-bit-rate (VBR) stream at its peak bit rate.
Standard, Professional. Read/write. |
MFPKEY_CHECKDATACONSISTENCY2P | Specifies whether the encoder should check for data consistency across passes when performing two-pass VBR encoding.
Standard, Professional, Lossless. Read-only. |
MFPKEY_CONSTRAINDECLATENCY | Specifies whether the encoder is constrained by a maximum decoder latency requirement.
Standard, Professional, Lossless. Read/write. |
MFPKEY_CONSTRAINENCCOMPLEXITY | Specifies whether the complexity of the encoding algorithm is constrained.
Standard, Professional, Lossless. Read/write. |
MFPKEY_CONSTRAINENCLATENCY | Specifies whether the encoder is constrained by a maximum latency requirement.
Standard, Professional, Lossless. Read/write. |
MFPKEY_CONSTRAIN_ENUMERATED_VBRQUALITY | Specifies whether modes enumerated by the encoder are limited to those that meet a quality requirement.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DECODERCOMPLEXITYPROFILE | Specifies the complexity profile of the encoded content.
Standard, Professional, Lossless. Read-only. |
MFPKEY_DESIRED_VBRQUALITY | Specifies the desired quality level for VBR encoding.
Standard, Professional, Lossless. Write-only. |
MFPKEY_DYN_ALLOW_NOISESUB | Specifies whether the encoder uses noise substitution.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_ALLOW_PCMRANGELIMITING | Specifies whether the encoder uses PCM range limiting.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_BANDTRUNC_BWCEIL | Specifies the maximum coded bandwidth allowed by band truncation in the encoder.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_BANDTRUNC_BWFLOOR | Specifies the minimum coded bandwidth allowed by band truncation in the encoder.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_BANDTRUNC_QCEIL | Specifies the quality at which minimum coded bandwidth is allowed.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_BANDTRUNC_QFLOOR | Specifies the quality at which maximum coded bandwidth is allowed.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_BANDTRUNCATION | Specifies whether the encoder performs band truncation.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_SIMPLEMASK | Specifies whether the encoder uses the style of mask computation performed by version 7 of the Windows Media Audio encoder.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_STEREO_PREPROC | Specifies whether the encoder performs stereo image processing.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_VBR_BAVG | Specifies the buffer window, in milliseconds, for an encoder that is configured to use average-controllable VBR encoding.
Standard, Professional, Lossless. Read/write. |
MFPKEY_DYN_VBR_RAVG | Specifies the average bit rate, in bits per second, for an encoder that is configured to use average-controllable VBR encoding.
Standard, Professional, Lossless. Read/write. |
MFPKEY_ENCCOMPLEXITY | Specifies the complexity of the encoding algorithm.
Standard, Professional, Lossless. Read/write. |
MFPKEY_ENDOFPASS | Specifies the end of an encoding pass.
Standard, Professional. Write-only. |
MFPKEY_ENHANCED_WMA | Specifies whether the core encoder uses the "Plus" feature.
Professional. Read/write. |
MFPKEY_MAXDECLATENCYMS | Specifies the maximum latency for the decoder, in milliseconds.
Standard, Professional, Lossless. Write-only. |
MFPKEY_MAXENCLATENCYMS | Specifies the maximum latency for the encoder, in milliseconds.
Standard, Professional, Lossless. Write-only. |
MFPKEY_MOST_RECENTLY_ENUMERATED_VBRQUALITY | Specifies the VBR quality level of the most recently enumerated output type.
Standard, Professional, Lossless. Read-only. |
MFPKEY_PASSESRECOMMENDED | Specifies the maximum number of passes supported by the encoder.
Standard, Professional, Lossless. Read-only. |
MFPKEY_PASSESUSED | Specifies the number of passes that the encoder will use to encode the content.
Standard, Professional, Lossless. Read/write. |
MFPKEY_PEAKCONSTRAINED | Specifies whether the encoder is constrained by a peak bit rate.
Standard, Professional. Read/write. |
MFPKEY_PREFERRED_FRAMESIZE | Specifies the preferred number of samples per frame.
Professional. Read/write. |
MFPKEY_REQUESTING_A_FRAMESIZE | Specifies whether the encoder should use a preferred frame size.
Professional. Read/write. |
MFPKEY_RMAX | Specifies the peak bit rate, in bits per second, used for constrained 2-pass variable-bit-rate (VBR) encoding.
Standard, Professional. Read/write. |
MFPKEY_STAT_BAVG | Specifies the average buffer window, in milliseconds, of an encoded stream.
Standard, Professional, Lossless. Read-only. |
MFPKEY_STAT_BMAX | Specifies the maximum buffer window, in milliseconds, of an encoded stream.
Standard, Professional, Lossless. Read-only. |
MFPKEY_STAT_RAVG | Specifies the average bit rate, in bits per second, of an encoded stream.
Standard, Professional, Lossless. Read-only. |
MFPKEY_STAT_RMAX | Specifies the maximum bit rate, in bits per second, of an encoded stream.
Standard, Professional, Lossless. Read-only. |
MFPKEY_VBRENABLED | Specifies whether the encoder uses VBR encoding.
Standard, Professional, Lossless. Read/write. |
MFPKEY_WMA_ELEMENTARY_STREAM | This property is currently not used by the Windows Media Audio codec. |
MFPKEY_WMADRC_AVGREF | Specifies the average volume level of audio content.
Standard, Professional, Lossless. Read-only. |
MFPKEY_WMADRC_PEAKREF | Specifies the highest volume level occurring in audio content.
Standard, Professional, Lossless. Read-only. |
MFPKEY_WMAENC_AVGBYTESPERSEC | Specifies the average bytes per second for VBR encoded audio.
Standard, Professional, Lossless. Read-only. |
MFPKEY_WMAENC_BUFFERLESSCBR | Specifies whether the encoder should produce 1 WMA packet per frame.
Standard, Professional, Lossless. Read/write. |
MFPKEY_WMAENC_GENERATE_DRC_PARAMS | Specifies whether the encoder should generate dynamic range control parameters.
Standard, Professional, Lossless. Read/write. |
MFPKEY_WMAENC_ORIGWAVEFORMAT | Specifies the WAVEFORMATEX structure describing the input audio content.
Standard, Professional. Read/write. |
MFPKEY_WMAENC_RTSPDIF | Specifies whether the encoder should enable real-time S/PDIF encoding .
Professional. Read/write. |
Requirements
Requirement | Value |
---|---|
Client |
Windows XP, Windows Vista or Windows 7 |
Header |
|
DLL |
|
See also