An AIFF-C file is an IFF file. It is one FORM chunk holding further chunks,
and every number in its chunk headers and fields is big-endian.
Chunk
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ID | ckID | four printable ASCII characters, 0x20 to 0x7E; no leading spaces, trailing spaces allowed |
| 4 | 4 | s32 | ckSize | the number of data bytes, not counting this header or the pad byte |
| 8 | ckSize | bytes | ckData | the chunk’s data |
| … | 0 or 1 | byte | pad | a zero byte after data of odd length, not counted in ckSize |
FORM chunk
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | ID | ckID | FORM |
| 4 | 4 | s32 | ckSize | the size of everything after this field, which is the file’s length minus 8 |
| 8 | 4 | ID | formType | AIFC |
| 12 | … | chunks | local chunks | the chunks below, in any order |
FVER chunk: format version
Every AIFF-C file has exactly one. Its size is 4.
| Offset | Size | Type | Name | Description |
|---|---|---|---|---|
| 0 | 4 | u32 | timestamp | the date of the format version, in seconds since 1 January 1904; not the date of the file |
The only value defined is AIFCVersion1, 0xA2805140: 23 May
1990, 2:40 p.m. Only Apple could change it. libsndfile warns when a file lacks this
chunk, but still reads the file.
Chunks in a FORM AIFC
| ID | Chunk | Number | Page |
|---|---|---|---|
FVER | format version | exactly one | above |
COMM | common | exactly one | Common chunk |
SSND | sound data | at most one; required unless there are no sample frames | Sound data |
MARK | marker | at most one | Metadata chunks |
COMT | comments | at most one | Metadata chunks |
INST | instrument | at most one | Metadata chunks |
MIDI | MIDI data | any number | Metadata chunks |
AESD | audio recording | at most one | Metadata chunks |
APPL | application specific | any number | Metadata chunks |
SAXL | sound accelerator | draft only | Metadata chunks |
NAME, AUTH, (c) | name, author, copyright | at most one of each | Metadata chunks |
ANNO | annotation | any number | Metadata chunks |
Chunks may come in any order, so a reader finds them by ID, not position. Audio is usually last. A program that changes the audio must update chunks derived from it, and should drop chunks it does not understand.
Example
A mono file of 1,000 frames of 16-bit uncompressed audio at 44,100 Hz.
| Offset | Bytes | Meaning |
|---|---|---|
| 0 | 46 4F 52 4D | FORM |
| 4 | 00 00 08 1E | size 2,078 |
| 8 | 41 49 46 43 | AIFC |
| 12 | 46 56 45 52 | FVER |
| 16 | 00 00 00 04 | size 4 |
| 20 | A2 80 51 40 | AIFCVersion1 |
| 24 | 43 4F 4D 4D | COMM |
| 28 | 00 00 00 26 | size 38 |
| 32 | 00 01 | 1 channel |
| 34 | 00 00 03 E8 | 1,000 frames |
| 38 | 00 10 | 16 bits |
| 40 | 40 0E AC 44 00 00 00 00 00 00 | 44,100 Hz |
| 50 | 4E 4F 4E 45 | compression type NONE |
| 54 | 0E 6E 6F 74 20 63 6F 6D 70 72 65 73 73 65 64 00 | name: not compressed, with a pad byte |
| 70 | 53 53 4E 44 | SSND |
| 74 | 00 00 07 D8 | size 2,008 |
| 78 | 00 00 00 00 | offset 0 |
| 82 | 00 00 00 00 | block size 0 |
| 86 | 2,000 bytes | samples |