Sound sample description extensions
Extend sound sample descriptions by appending other atoms.
Overview
All extensions to the SoundDescription record are made using atoms. That means one or more atoms can be appended to the end of the SoundDescription record using the standard [size, type] mechanism used throughout the QuickTime movie architecture. Extensions were first added with sound sample description v1.
To illustrate this, for sound sample description v1, the extensions are added by following the last field of the struct with QuickTime atoms. The struct implementation looks like this:
struct SoundDescriptionV1 {
// original fields
SoundDescription desc;
// fixed compression ratio information
unsigned long samplesPerPacket;
unsigned long bytesPerPacket;
unsigned long bytesPerFrame;
unsigned long bytesPerSample;
// optional, additional atom-based fields --
// ([long size, long type, some data], repeat)
};Version 2 of the sound sample description maintains the same mechanism for the addition of extensions. In the sound sample description v2 structure, the sizeOfStructOnly field value provides the offset to the extensions.