numSampleFrames
#include <AIFF.h>
ID ckID; 4 0 'COMM'
long ckSize; 4 4 size of chunk data
short numChannels; 2 8 number of channels
long numSampleFrames; 4 10 number of sample frames
short sampleSize; 2 14 number of bits per sample
Extended sampleRate; 12 16 number of frames per second typedef CommonChunk *CommonChunkPtr;
the following meanings:
Field descriptions
ID is 'COMM'.
ckSize The size of the data portion of this chunk. In AIFF
files, this field is always 18 in the
ckID and ckSize fields are not included. In AIFF-C
files, 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; 2 indicates stereo sound; 4 indicates
four-channel sound, etc. You can use any number of
audio channels . The actual sound data is stored
numSampleFrames The number of sample frames in the
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 *
frame.)
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.
An AIFF-C Common Chunk includes two fields that describe the type of
compression (if any) used on the audio data:
Field descriptions
compressionType The ID of the compression algorithm, if any, used
on the sound data.
compressionName A human-readable name for the compression
algorithm ID specified in the compressionType
field. This string is useful when putting up alert
boxes (perhaps because a necessary de compression
routine is missing). Remember to pad the end of
this array with a byte having the value 0 if the
length of this array is not an even number (but do
not include the pad byte in the count).
Here are the currently available compression IDs and their associated
compression names:
compressionType compressionName Description
'NONE' 'not compressed' Noncompressed samples
'ACE2' 'ACE 2-to-1' IIÚGSÙ 2-to-1 compressed
'ACE8' 'ACE 8-to-3' IIÚGSÙ 8-to-3 compressed
'MAC3' 'MACE 3-to-1' Macintosh 3-to-1 compressed
'MAC6' 'MACE 6-to-1' Macintosh 6-to-1 compressed
You can define your own compression types, but you should register them
with Apple.