Microsoft DirectX 8.1 (C++)

Audio Subtypes

The following table describes the audio media subtypes.

GUID Description
MEDIASUBTYPE_PCM PCM audio.
MEDIASUBTYPE_PCMAudioObsolete Obsolete. Do not use.
MEDIASUBTYPE_MPEG1Packet MPEG1 Audio packet.
MEDIASUBTYPE_MPEG1Payload MPEG1 Audio Payload.

The wFormatTag field in the WAVEFORMATEX structure specifies the audio format type. The format type is generally FORMAT_WaveFormatEx. Media samples are generally whole number of samples as specified in the wBitsPerSample field in the WAVEFORMATEX structure. This is not necessarily true for MPEG audio samples that can come from packetized streams and are therefore not necessarily packaged on sample / frame boundaries. For MPEG audio the time stamp in a media sample is the time stamp for the first frame whose first byte is contained in the media sample.

Media subtypes are defined for each wFormatTag as follows:

Thus, for PCM audio the subtype GUID would be:

{00000001-0000-0010-8000-00AA00389B71}

Older filters may use GUID_NULL as the subtype so this should be checked for. However, registration of a filter with the explicit subtype greatly improves the speed of graph loading, especially when the given filter is not required. The CreateAudioMediaType function can be used to create an AM_MEDIA_TYPE structure from a WAVEFORMATEX structure.