MFCreateWaveFormatExFromMFMediaType function (mfapi.h)
Converts a Media Foundation audio media type to a WAVEFORMATEX structure.
Syntax
HRESULT MFCreateWaveFormatExFromMFMediaType(
IMFMediaType *pMFType,
WAVEFORMATEX **ppWF,
UINT32 *pcbSize,
UINT32 Flags
);
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2008 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | mfapi.h |
Library | Mfplat.lib |
DLL | Mfplat.dll |