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.
Syntax
HRESULT CreateAudioMediaType(
const WAVEFORMATEX *pAudioFormat,
UINT32 cbAudioFormatSize,
IAudioMediaType **ppIAudioMediaType
);
Parameters
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.
Return value
The CreateAudioMediaType
function returns S_OK if the call to the function is successful. Otherwise, it returns an appropriate HRESULT error code.
Remarks
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.
Requirements
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 |