CreateAudioMediaType function (audiomediatype.h)
The CreateAudioMediaType
function uses the format specified by the caller to create a media type object that describes the audio format.
HRESULT CreateAudioMediaType(
const WAVEFORMATEX *pAudioFormat,
UINT32 cbAudioFormatSize,
IAudioMediaType **ppIAudioMediaType
);
pAudioFormat
Specifies a pointer to a WAVEFORMATEX structure.
cbAudioFormatSize
Specifies the size of the WAVEFORMATEX structure pointed to by the pAudioFormat parameter.
ppIAudioMediaType
Specifies a pointer to an IAudioMediaType interface.
The CreateAudioMediaType
function returns S_OK if the call to the function is successful. Otherwise, it returns an appropriate HRESULT error code.
When you implement custom audio system effects, the CreateAudioMediaType
function works with IAudioSystemEffectsCustomFormats::GetFormat to represent a custom audio data format and to provide information about the custom format.
Requirement | Value |
---|---|
Minimum supported client | Available in Windows Vista and later versions of Windows. |
Target Platform | Desktop |
Header | audiomediatype.h (include Audiomediatype.h) |
IRQL | N/A |