Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.
Extended Common Chunks
An AIFF-C file contains an extended Common Chunk that includes all of the fields of the Common Chunk, but adds two fields that describe the type of compression (if any) used on the audio data. TheExtCommonChunk
data type defines an extended Common Chunk.
TYPE ExtCommonChunk = RECORD ckID: ID; {'COMM'} ckSize: LongInt; {size of chunk data} numChannels: Integer; {number of channels} numSampleFrames: LongInt; {number of sample frames} sampleSize: Integer; {number of bits per sample} sampleRate: Extended; {number of frames per second} compressionType: ID; {compression type ID} compressionName: PACKED ARRAY[0..0] OF Byte; {compression type name} END;
Field Description
ckID
- The ID of this chunk. For an extended Common Chunk, this ID is
'COMM'
.ckSize
- The size of the data portion of this chunk. For an extended Common Chunk, this size is 22 plus the number of bytes in the
compressionName
string.numChannels
- 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.
numSampleFrames
- The number of sample frames in the Sound Data Chunk. Note that 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
.sampleSize
- 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.sampleRate
- The sample rate at which the sound is to be played back, in sample frames per second.
compressionType
- The ID of the compression algorithm, if any, used on the sound data. Compression algorithms supplied by Apple have the following types:
CONST NoneType = 'NONE'; ACE2Type = 'ACE2'; ACE8Type = 'ACE8'; MACE3Type = 'MAC3'; MACE6Type = 'MAC6';
- You can define your own compression types, but you should register them with Apple.
compressionName
- A human-readable name for the compression algorithm ID specified in the
compressionType
field. If the number of bytes in this field is odd, then it is padded with the digit 0. Compression algorithms supplied by Apple have the following names:CONST NoneName = 'not compressed'; ACE2to1Name = 'ACE 2-to-1'; ACE8to3Name = 'ACE 8-to-3'; MACE3to1Name = 'MACE 3-to-1'; MACE6to1Name = 'MACE 6-to-1';
- You can define your own compression types, but you should register them with Apple.