MFCreateWaveFormatExFromMFMediaType function
Converts a Media Foundation audio media type to a WAVEFORMATEX structure.
Syntax
HRESULT MFCreateWaveFormatExFromMFMediaType( IMFMediaType *pMFType, WAVEFORMATEX **ppWF, UINT32 *pcbSize, UINT32 Flags = MFWaveFormatExConvertFlag_Normal );
Parameters
- pMFType
-
Pointer to the IMFMediaType interface of the media type.
- ppWF
-
Receives a pointer to the WAVEFORMATEX structure. The caller must release the memory allocated for the structure by calling CoTaskMemFree.
- pcbSize
-
Receives the size of the WAVEFORMATEX structure.
- Flags
-
Contains a flag from the MFWaveFormatExConvertFlags enumeration.
Return value
The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
|
The function succeeded. |
Remarks
If the wFormatTag member of the returned structure is WAVE_FORMAT_EXTENSIBLE, you can cast the pointer to a WAVEFORMATEXTENSIBLE structure.
Requirements
|
Minimum supported client |
Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8.1 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also