[vorbis-dev] WAVE Format info

Ingo Ralf Blum ingoralfblum at gmx.de
Sun Jul 29 15:47:46 PDT 2001



> My version of MMREG.H (which I attached earlier) does not define the
> WAVEFORMATEXTENSIBLE structure, but it seems like an even newer
> extension to handle samples with more then two channels.  Note that
> a WAVEFORMAT is a subset of WAVEFORMATEX, and WAVEFORMATEX
> is a subset of WAVEFORMATEXTENSIBLE, indicating they they maintained
> backward compatibility.

The WAVEFORMATEXTENSIBLE was introduced last year to first have an additional
field, which allows to specify, which channels are contained in a WAV file (and
AVI and others) and second to make it possible to write audio codecs without the
need to register them with Microsoft. Until then every new audio codec had to
register a 16 bit value, which specifies the codec used, like e.g.
WAVE_FORMAT_PCM (=1).

So if you want to read a WAVEFORNATEXTENSIBLE for PCM data, you'll have to test
whether the embedded GUID has the value MEDIASUBTYPE_PCM. This symbol can be
found in the MS include file uuids.h. Note that it is not suffucient to test for
the format value, which is now WAVE_FORMAT_EXTENSIBLE (=0xfffe).

The backward compatibility is required not only for WAV files, but also for some
other files like AVIs and primarily for all DirectShow audio filters. All these
use the WAVEFORMATxxx structures.

Regards Ingo

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list