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.
Sound Data Chunks
AIFF and AIFF-C files generally contain a Sound Data Chunk that contains the actual sampled-sound data. TheSoundDataChunk
data type defines a Sound Data Chunk.
TYPE SoundDataChunk = RECORD ckID: ID; {'SSND'} ckSize: LongInt; {size of chunk data} offset: LongInt; {offset to sound data} blockSize: LongInt; {size of alignment blocks} END;The sampled-sound data follows the
Field Description
ckID
- The ID of this chunk. For a Sound Data Chunk, this ID is
'SSND'
.ckSize
- The size of the data portion of this chunk. This size does not include the 8 bytes occupied by the values in the
ckID
and theckSize
fields.offset
- An offset (in bytes) to the beginning of the first sample frame in the chunk data. Most applications do not need to use the offset field and should set it to 0.
blockSize
- The size (in bytes) of the blocks to which the sound data is aligned. This field is used in conjunction with the
offset
field for aligning sound data to blocks. As with theoffset
field, most applications do not need to use theblockSize
field and should set it to 0.blockSize
field. If the data following theblockSize
field contains an odd number of bytes, a pad byte with a value of 0 is added at the end to preserve an even length for this chunk. If there is a pad byte, it is not included in theckSize
field. For information on the format of the sampled-sound data, see "Sound Files" on page 2-81.