![]() |
CommonChunk |
Header: AIFF.h |
struct CommonChunk { ID ckID; SInt32 ckSize; SInt16 numChannels; UInt32 numSampleFrames; SInt16 sampleSize; extended80 sampleRate; }; typedef CommonChunk CommonChunkPtr;
The ID of this chunk. For a Common Chunk, this ID is 'COMM'.
The size of the data portion of this chunk. In AIFF files, this field is always 18 because the 8 bytes used by the ckID and ckSize fields are not included.
The number of audio channels contained in the sampled sound. A value of 1 indicates monophonic sound, a value of 2 indicates stereo sound, a value of 4 indicates four-channel sound, and so forth.
The number of sample frames in the Sound Data Chunk. This field contains the number of sample frames, not the number of bytes of data and not the number of sample points. For noncompressed sound data, the total number of sample points in the file is numChannels * numSampleFrames.
The number of bits in each sample point of noncompressed sound data. The sampleSize field can contain any integer from 1 to 32. For compressed sound data, this field indicates the number of bits per sample in the original sound data, before compression.
The sample rate at which the sound is to be played back, in sample frames per second.
Every AIFF and AIFF-C file contains a Common Chunk that defines some fundamental characteristics of the sampled sound contained in the file. The format of the Common Chunk is different for AIFF and AIFF-C files. As a result, you need to determine the type of file format (by inspecting the formType field of the Form Chunk) before reading the Common Chunk.
For AIFF files, the CommonChunk data type defines a Common Chunk.
You should use this data structure only if you need to access this information or to customize sound play.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)