The compressionType field of the
common chunk is a case-sensitive
four-character code. There is no public complete register: this list gathers what Apple,
McGill University’s notes, libsndfile and FFmpeg document. Apple defined the first five;
software since has added its own.
Uncompressed PCM
| Type | Name | Audio | Listed by |
|---|---|---|---|
NONE | not compressed | PCM, big-endian | Apple |
twos | PCM, big-endian | libsndfile, FFmpeg | |
sowt | not compressed | PCM, little-endian (the type’s name is “twos” backwards) | McGill MMSP (introduced by Apple), libsndfile, FFmpeg |
raw | 8-bit unsigned PCM | libsndfile, FFmpeg | |
in24 | 24-bit PCM, big-endian | libsndfile, FFmpeg | |
in32 | 32-bit PCM, big-endian | libsndfile, FFmpeg | |
42n1 | 24-bit PCM, little-endian (libsndfile’s source defines the code as 42n1; 42ni, “in24” backwards, is the pattern of 23ni for 32 bits and the explorer reads it too. Tested 2026-11-19 with afinfo, Core Audio’s own reader, on a copy of a 24-bit file with only this code changed: it reads in24 and 23ni (32-bit, little-endian) but says nothing for 42n1, 42ni or ni24. Apple’s reader therefore takes neither spelling; 42n1 is the only one a writer is known to produce) | libsndfile | |
23ni | 32-bit PCM, little-endian (“in32” backwards) | libsndfile |
Floating point
| Type | Name | Audio | Listed by |
|---|---|---|---|
fl32 | 32-bit floating point | IEEE 32-bit float | McGill MMSP, libsndfile, FFmpeg |
FL32 | Float 32 | IEEE 32-bit float | SoundHack, Csound |
fl64 | 64-bit floating point | IEEE 64-bit float | McGill MMSP, libsndfile, FFmpeg |
FL64 | IEEE 64-bit float | libsndfile |
Apple’s floats are normalised to a full scale of 1.
Companded
| Type | Name | Audio | Listed by |
|---|---|---|---|
alaw | ALaw 2:1 | 8-bit G.711 A-law | McGill MMSP, libsndfile, FFmpeg |
ALAW | CCITT G.711 A-law | 8-bit G.711 A-law | SGI |
ulaw | µLaw 2:1 | 8-bit G.711 µ-law | McGill MMSP, libsndfile, FFmpeg |
ULAW | CCITT G.711 u-law | 8-bit G.711 µ-law | SGI |
QuickTime recognises only the Apple spellings.
Codecs
| Type | Name | Audio | Listed by |
|---|---|---|---|
ACE2 | ACE 2-to-1 | Apple IIGS ACE (Audio Compression / Expansion), 2:1: one byte of data for two 8-bit samples, so 4 bits a sample | Apple (AIFF-C draft, section 4.0 and Appendix C) |
ACE8 | ACE 8-to-3 | Apple IIGS ACE, 8:3: three bytes of data for eight 8-bit samples, so 3 bits a sample | Apple (the same) |
MAC3 | MACE 3-to-1 | MACE | Apple |
MAC6 | MACE 6-to-1 | MACE | Apple |
ima4 | IMA 4:1 | IMA ADPCM | libsndfile, FFmpeg (also written by Core Audio’s afconvert, tested here) |
ADP4 | 4:1 Intel/DVI ADPCM | IMA ADPCM, Audio Convert/Player on AmigaOS | Wikipedia, FFmpeg |
DWVW | Delta with variable word width | TX16W Typhoon | Wikipedia, libsndfile |
GSM | GSM 6.10 | libsndfile, FFmpeg | |
G722 | G.722 ADPCM | FFmpeg | |
G726 | G.726 ADPCM | FFmpeg | |
G728 | G.728 | FFmpeg | |
Qclp | Qualcomm PureVoice | QCELP | Wikipedia, FFmpeg |
QDMC | QDesign Music | QDesign | Wikipedia, FFmpeg |
QDM2 | QDesign Music 2 | FFmpeg | |
rt24 | RT24 50:1 | Voxware | Wikipedia |
rt29 | RT29 50:1 | Voxware | Wikipedia |
SDX2 | Square-Root-Delta | SDX2 DPCM, big-endian | Wikipedia, FFmpeg |
CBD2 | CBD2 DPCM | FFmpeg | |
VAPC | Nintendo 64 VADPCM | FFmpeg |
Apple also maps Microsoft ACM codecs to codes of the form ms??, with the
last two bytes the ACM code (the WAVE format tag). Microsoft ADPCM, format tag 2, is the
four bytes ms\0\2; IMA ADPCM (tag 0x11) is ms\0\x11; Microsoft GSM 6.10
(tag 0x31, which is the character “1”) is the bytes 6D 73 00 31, which afconvert prints as
ms\x001; MPEG Layer III (tag 0x55, “U”) is ms\0U. afconvert -hf on macOS lists
ms\x00\x02, ms\x00\x11 and ms\x001 as data formats it can write into AIFF-C (this Mac’s
afconvert refused to write them: its encoders are not on this Mac, but its decoders are, so files were made by wrapping FFmpeg’s WAVE ADPCM blocks in AIFF-C
with a wave chunk of the atoms frma (the type), an atom named by the type holding the WAVEFORMATEX, and a terminator; afinfo reads them (block size and frames
a block from the WAVEFORMATEX) and afconvert decodes them to the same samples as FFmpeg decodes the WAVE original, for ms\0\2 and ms\0\x11).
afconvert -hf also lists dvi8 and ilbc; it writes ilbc but not dvi8 (nor .mp2), which it only reads.
| Type | Name | Audio | Listed by |
|---|---|---|---|
ilbc | iLBC | Internet Low Bitrate Codec, RFC 3951 | afconvert (AIFF-C list), seen in a file made by it with a wave chunk |
dvi8 | DVI (IMA) ADPCM, 8-bit packaging | afconvert (AIFF-C list) | |
.mp2, .mp3 | MPEG audio layer II and III in AIFF-C | afconvert lists .mp2 for AIFF-C; read by the explorer as a stream of MPEG frames (see below) | |
aac , alac | MPEG-4 AAC and Apple Lossless | Apple’s Supported Audio File and Data Formats in OS X (Table D-1) lists them for MPEG-4, M4A, ADTS and CAF files and not for AIFC; their layout in AIFF-C is unknown | |
agsm | Apple GSM 10:1 | standard GSM 06.10 frames: 33 bytes, 160 sample frames | Apple’s table lists it for AIFC and CAF. Core Audio’s ACGSMDecoder (AudioCodecs.component, disassembled) sets 33 bytes and 160 frames a packet for agsm and hands each packet unchanged to gsm_decode; the explorer decodes it with its GSM 06.10 decoder |
dvi , lpc , drms | DVI 4:1, LPC 23:1, Apple DRM audio | Core Audio codecs, decode only | Apple’s table lists them for CAF files; no layout is published |
The details of each codec are outside this format. A reader that does not know a type cannot play the audio, but it can still read the other chunks.
The explorer decodes NONE, twos, sowt, in24, in32,
42ni, 42n1, 23ni, raw , fl32, FL32, fl64,
FL64, ulaw, ULAW, alaw, ALAW, ima4, GSM ,
MAC3, MAC6, QDM2, QDMC, Qclp, G722, G726,
G728, ilbc, ms\0\2, ms\0\x11, ms\0 1, dvi8, ADP4,
SDX2, CBD2, VAPC and DWVW. It names the others and says why it does not decode them.
How each coding is laid out in the sound data
The sound data of a coded type is a run of units of a fixed size, except DWVW. numSampleFrames counts the
units in files Apple’s software writes (ima4, ilbc), but sample frames in files from libsndfile and SoX
(G722, G726, G728, GSM , VAPC); the explorer reads either where the
coding is known to be written both ways, and shows which it found. Checked on 2026-11-19 against afconvert (Core Audio) and FFmpeg 8.
| Type | Unit | Sample frames in a unit | Layout and agreement with the oracles |
|---|---|---|---|
G722 | 1 byte a channel | 2 | High-band code in bits 7 and 6, low-band code (64 kbit/s: 6 bits) below; equal to FFmpeg on the real SoX file g722.aifc. |
G726 | 5 bytes a channel | 8 | 5-bit codes (40 kbit/s), the first in the low bits (right-justified, FFmpeg’s g726le); on the real file o2_726.aiff the explorer’s ITU STL-exact decode agrees with FFmpeg’s to about 23 dB signal-to-difference, with the same frame count (FFmpeg’s G.726 is not ITU-exact; differences measured by scripts/pcm/g726-ffmpeg-compare.mjs). |
G728 | 5 bytes | 20 | Four 10-bit codewords, the first in the high bits. Decoded with the post-filter of the ITU reference; FFmpeg’s decoder has none, and the post-filter off equals FFmpeg within 1 (with it, 17 dB apart) on the real file o2_728.aiff. |
GSM | 33 bytes | 160 | Frame with the 0xD signature in the first four bits (RTP packing); equal to FFmpeg on the real file o2_gsm.aiff. |
ilbc | 38 or 50 bytes | 160 or 240 | RFC 3951 frames; the wave chunk is two 32-bit words, the frames in a packet (160 or 240) and 0. 31.0 and 29.4 dB against afconvert’s decoding (20 and 30 ms): Apple’s decoder is not the RFC’s enhancer sample for sample. |
ms\0\2, ms\0\x11 | the block align of the WAVEFORMATEX in the wave chunk (an atom named by the type) | the samples a block of that WAVEFORMATEX | The WAVE codings, block for block; equal to afconvert (Core Audio) sample for sample on files with FFmpeg’s blocks. |
ms\0 1 | 65 bytes | 320 | WAV49: two GSM frames, fields packed least significant bit first; equal to FFmpeg’s gsm_ms decoder. |
dvi8 | 512 bytes | 1017 | The layout of WAVE’s IMA ADPCM block (4-byte header, then codes), no wave chunk; afinfo reports 512 bytes and 1017 frames a packet; equal to afconvert. |
ADP4 | 1 byte a channel | 2 | Westwood’s IMA ADPCM (FFmpeg adpcm_ima_ws): the low nibble first, predictor and step index start at 0 and run on; equal to FFmpeg, mono and stereo. |
SDX2, CBD2 | 1 byte a channel | 1 | A signed byte n gives a step of n × |n| × 2 (SDX2) or n × |n| × |n| ÷ 64 (CBD2); a byte with its low bit set adds the step to the running sample, one with it clear restarts the running sample at 0 first; limited to 16 bits. Equal to FFmpeg on random bytes, mono and stereo. |
VAPC | 9 bytes | 16 | Nintendo 64 VADPCM: scale (high nibble) and predictor (low nibble), 16 4-bit codes; the codebook is in an APPL stoc chunk named VADPCMCODES (version 1, order 2, predictors, 16-bit weights). Equal to FFmpeg with one predictor; FFmpeg takes predictor 0 for every frame, so with more it differs, and this reads the predictor each frame names. |
DWVW | none: a bit stream | — | Per sample: a unary change of the delta width and its sign, the delta’s bits below the top one, a sign, and an extra bit for the largest delta; widths and sample wrap at the sample size. From libsndfile’s dwvw.c. |
QDMC, QDM2 | the packet size in the QDCA atom | the group size in it | QDMC equal to FFmpeg within 1 on the packets of a real QuickTime movie put in an AIFF-C file; QDM2 see below. |
MPEG audio (.mp2, .mp3, ms\0U) is read by the explorer as a stream of MPEG audio frames found by their sync words, with
numSampleFrames counting the frames (packets), following afinfo’s reading described below; the decoder is the same as the MP3 viewer’s, and its samples equal
FFmpeg’s within 2 of 32,768 on Layer II and Layer III streams of 1 and 2 channels. This is the explorer’s reading, because no specification or writer exists: a count that is too big for
packets but fits the data as sample frames is read as sample frames. AAC (aac ) and Apple Lossless (alac) are not read from AIFF-C: Apple’s table lists them for other files only. AIFF has no packet table. Tried with Core Audio on macOS
27.0.1: an MP2 stream of 42 frames (24,192 bytes, 48 kHz stereo) wrapped as .mp2 in AIFF-C is described by afinfo as 1,152 frames a packet with
0 bytes a packet, and when numSampleFrames holds the number of MPEG frames (42) it reports 42 packets, 1.008 s and 192,000 bit/s; with the real
sample-frame count (48,384) it reports 48,384 packets and a duration of 1,161 s. So Core Audio reads numSampleFrames of such a file as packets.
It still fails to decode the file (ExtAudioFileRead error −66567), a raw AC-3 stream wrapped as ac-3 is refused by AudioFileOpenURL,
and afconvert cannot write .mp2 or ac-3 into AIFF-C although afconvert -hf lists them. No writer or file with these codes is known, and no
specification found says how the packets are delimited, so frames are found by their headers. AC-3 is not decoded from AIFF-C. FFmpeg’s and libsndfile’s AIFF sources list none of these codes.
MACE 3:1 and 6:1
Apple publishes no description of the MACE algorithm; the only one is open source code, FFmpeg’s
libavcodec/mace.c (adapted from the 68k decoder). The explorer’s decoder follows it and equals
FFmpeg sample for sample on four real files (mono and stereo, 3:1 and 6:1; FATE’s QuickTime “surge” suite).
- MAC3 frames are 2 bytes and MAC6 frames 1 byte, each giving 6 samples of 8-bit sound that is widened to 16 bits by
repeating the high byte in the low byte.
numSampleFramescounts frames, so 6 samples each. - Two channels are stored frame by frame: for frame j the bytes of channel 0, then of channel 1.
- MAC6: a byte holds three codes,
b >> 5(3 bits),(b >> 3) & 3(2 bits) andb & 7(3 bits), read in that order. MAC3: the two bytes of a frame each hold three codes in the orderb & 7,(b >> 3) & 3,b >> 5. - Each channel has its own state:
index,leveland, for 6:1,factor,previousandprev2. Code k of a byte uses table pair 0 (step table{-13, 8, 76, 222, 222, 76, 8, -13}, value table of 128 rows of 4), 1 (step table{-18, 140, 140, -18}, 128 rows of 2) or 0 again. The row is(index & 0x7F0) >> 4. A code below the row width takes that entry; a larger one takes−1 − entry[2 × width − code − 1]. Thenindex += step[code] − (index >> 5), not below 0. The 128 + 128 table rows are listed below (FFmpeg’s mace.cMACEtab2,MACEtab4). - 3:1: the value plus
levelis clamped to 16 bits (below −32768 is −32767),levelbecomes that value minus its eighth, and the value is a sample. 6:1:factorgrows by 506 (to 32767) when the value has the sign ofpreviousand falls by 314 otherwise; the clamped sum withlevelgiveslevel = (sum × factor) >> 15; half the sum,c, then yields the two samplesprevious + prev2 − ((prev2 − c) >> 2)andprevious + c + ((prev2 − c) >> 2);prev2andpreviousmove on. - Starting state: every channel starts at the beginning of the sound with
index,level,factor,previousandprev2all 0, and the state is carried from frame to frame to the end: nothing is reset in the sound (which is why a marker has a saxel of up to 48 earlier frames, to bring a player to the state it would have had). - The two small tables above are used with the tables below: code k of a byte uses table 1 for the first and third codes
(rows of four,
MACEtab2) and table 2 for the second (rows of two,MACEtab4); the row number is the first column.
The MACE value tables (128 rows each, from FFmpeg’s mace.c)
| Row | MACEtab2 (first and third code) | MACEtab4 (second code) | ||||
|---|---|---|---|---|---|---|
| 0 | 37 | 116 | 206 | 330 | 64 | 216 |
| 1 | 39 | 121 | 216 | 346 | 67 | 226 |
| 2 | 41 | 127 | 225 | 361 | 70 | 236 |
| 3 | 42 | 132 | 235 | 377 | 74 | 246 |
| 4 | 44 | 137 | 245 | 392 | 77 | 257 |
| 5 | 46 | 144 | 256 | 410 | 80 | 268 |
| 6 | 48 | 150 | 267 | 428 | 84 | 280 |
| 7 | 51 | 157 | 280 | 449 | 88 | 294 |
| 8 | 53 | 165 | 293 | 470 | 92 | 307 |
| 9 | 55 | 172 | 306 | 490 | 96 | 321 |
| 10 | 58 | 179 | 319 | 511 | 100 | 334 |
| 11 | 60 | 187 | 333 | 534 | 104 | 350 |
| 12 | 63 | 195 | 348 | 557 | 109 | 365 |
| 13 | 66 | 205 | 364 | 583 | 114 | 382 |
| 14 | 69 | 214 | 380 | 609 | 119 | 399 |
| 15 | 72 | 223 | 396 | 635 | 124 | 416 |
| 16 | 75 | 233 | 414 | 663 | 130 | 434 |
| 17 | 79 | 244 | 433 | 694 | 136 | 454 |
| 18 | 82 | 254 | 453 | 725 | 142 | 475 |
| 19 | 86 | 265 | 472 | 756 | 148 | 495 |
| 20 | 90 | 278 | 495 | 792 | 155 | 519 |
| 21 | 94 | 290 | 516 | 826 | 162 | 541 |
| 22 | 98 | 303 | 538 | 862 | 169 | 564 |
| 23 | 102 | 316 | 562 | 901 | 176 | 590 |
| 24 | 107 | 331 | 588 | 942 | 185 | 617 |
| 25 | 112 | 345 | 614 | 983 | 193 | 644 |
| 26 | 117 | 361 | 641 | 1027 | 201 | 673 |
| 27 | 122 | 377 | 670 | 1074 | 210 | 703 |
| 28 | 127 | 394 | 701 | 1123 | 220 | 735 |
| 29 | 133 | 411 | 732 | 1172 | 230 | 767 |
| 30 | 139 | 430 | 764 | 1224 | 240 | 801 |
| 31 | 145 | 449 | 799 | 1280 | 251 | 838 |
| 32 | 152 | 469 | 835 | 1337 | 262 | 876 |
| 33 | 159 | 490 | 872 | 1397 | 274 | 914 |
| 34 | 166 | 512 | 911 | 1459 | 286 | 955 |
| 35 | 173 | 535 | 951 | 1523 | 299 | 997 |
| 36 | 181 | 558 | 993 | 1590 | 312 | 1041 |
| 37 | 189 | 584 | 1038 | 1663 | 326 | 1089 |
| 38 | 197 | 610 | 1085 | 1738 | 341 | 1138 |
| 39 | 206 | 637 | 1133 | 1815 | 356 | 1188 |
| 40 | 215 | 665 | 1183 | 1895 | 372 | 1241 |
| 41 | 225 | 695 | 1237 | 1980 | 388 | 1297 |
| 42 | 235 | 726 | 1291 | 2068 | 406 | 1354 |
| 43 | 246 | 759 | 1349 | 2161 | 424 | 1415 |
| 44 | 257 | 792 | 1409 | 2257 | 443 | 1478 |
| 45 | 268 | 828 | 1472 | 2357 | 462 | 1544 |
| 46 | 280 | 865 | 1538 | 2463 | 483 | 1613 |
| 47 | 293 | 903 | 1606 | 2572 | 505 | 1684 |
| 48 | 306 | 944 | 1678 | 2688 | 527 | 1760 |
| 49 | 319 | 986 | 1753 | 2807 | 551 | 1838 |
| 50 | 334 | 1030 | 1832 | 2933 | 576 | 1921 |
| 51 | 349 | 1076 | 1914 | 3065 | 601 | 2007 |
| 52 | 364 | 1124 | 1999 | 3202 | 628 | 2097 |
| 53 | 380 | 1174 | 2088 | 3344 | 656 | 2190 |
| 54 | 398 | 1227 | 2182 | 3494 | 686 | 2288 |
| 55 | 415 | 1281 | 2278 | 3649 | 716 | 2389 |
| 56 | 434 | 1339 | 2380 | 3811 | 748 | 2496 |
| 57 | 453 | 1398 | 2486 | 3982 | 781 | 2607 |
| 58 | 473 | 1461 | 2598 | 4160 | 816 | 2724 |
| 59 | 495 | 1526 | 2714 | 4346 | 853 | 2846 |
| 60 | 517 | 1594 | 2835 | 4540 | 891 | 2973 |
| 61 | 540 | 1665 | 2961 | 4741 | 930 | 3104 |
| 62 | 564 | 1740 | 3093 | 4953 | 972 | 3243 |
| 63 | 589 | 1818 | 3232 | 5175 | 1016 | 3389 |
| 64 | 615 | 1898 | 3375 | 5405 | 1061 | 3539 |
| 65 | 643 | 1984 | 3527 | 5647 | 1108 | 3698 |
| 66 | 671 | 2072 | 3683 | 5898 | 1158 | 3862 |
| 67 | 701 | 2164 | 3848 | 6161 | 1209 | 4035 |
| 68 | 733 | 2261 | 4020 | 6438 | 1264 | 4216 |
| 69 | 766 | 2362 | 4199 | 6724 | 1320 | 4403 |
| 70 | 800 | 2467 | 4386 | 7024 | 1379 | 4599 |
| 71 | 836 | 2578 | 4583 | 7339 | 1441 | 4806 |
| 72 | 873 | 2692 | 4786 | 7664 | 1505 | 5019 |
| 73 | 912 | 2813 | 5001 | 8008 | 1572 | 5244 |
| 74 | 952 | 2938 | 5223 | 8364 | 1642 | 5477 |
| 75 | 995 | 3070 | 5457 | 8739 | 1715 | 5722 |
| 76 | 1039 | 3207 | 5701 | 9129 | 1792 | 5978 |
| 77 | 1086 | 3350 | 5956 | 9537 | 1872 | 6245 |
| 78 | 1134 | 3499 | 6220 | 9960 | 1955 | 6522 |
| 79 | 1185 | 3655 | 6497 | 10404 | 2043 | 6813 |
| 80 | 1238 | 3818 | 6788 | 10869 | 2134 | 7118 |
| 81 | 1293 | 3989 | 7091 | 11355 | 2229 | 7436 |
| 82 | 1351 | 4166 | 7407 | 11861 | 2329 | 7767 |
| 83 | 1411 | 4352 | 7738 | 12390 | 2432 | 8114 |
| 84 | 1474 | 4547 | 8084 | 12946 | 2541 | 8477 |
| 85 | 1540 | 4750 | 8444 | 13522 | 2655 | 8854 |
| 86 | 1609 | 4962 | 8821 | 14126 | 2773 | 9250 |
| 87 | 1680 | 5183 | 9215 | 14756 | 2897 | 9663 |
| 88 | 1756 | 5415 | 9626 | 15415 | 3026 | 10094 |
| 89 | 1834 | 5657 | 10057 | 16104 | 3162 | 10546 |
| 90 | 1916 | 5909 | 10505 | 16822 | 3303 | 11016 |
| 91 | 2001 | 6173 | 10975 | 17574 | 3450 | 11508 |
| 92 | 2091 | 6448 | 11463 | 18356 | 3604 | 12020 |
| 93 | 2184 | 6736 | 11974 | 19175 | 3765 | 12556 |
| 94 | 2282 | 7037 | 12510 | 20032 | 3933 | 13118 |
| 95 | 2383 | 7351 | 13068 | 20926 | 4108 | 13703 |
| 96 | 2490 | 7679 | 13652 | 21861 | 4292 | 14315 |
| 97 | 2601 | 8021 | 14260 | 22834 | 4483 | 14953 |
| 98 | 2717 | 8380 | 14897 | 23854 | 4683 | 15621 |
| 99 | 2838 | 8753 | 15561 | 24918 | 4892 | 16318 |
| 100 | 2965 | 9144 | 16256 | 26031 | 5111 | 17046 |
| 101 | 3097 | 9553 | 16982 | 27193 | 5339 | 17807 |
| 102 | 3236 | 9979 | 17740 | 28407 | 5577 | 18602 |
| 103 | 3380 | 10424 | 18532 | 29675 | 5826 | 19433 |
| 104 | 3531 | 10890 | 19359 | 31000 | 6086 | 20300 |
| 105 | 3688 | 11375 | 20222 | 32382 | 6358 | 21205 |
| 106 | 3853 | 11883 | 21125 | 32767 | 6642 | 22152 |
| 107 | 4025 | 12414 | 22069 | 32767 | 6938 | 23141 |
| 108 | 4205 | 12967 | 23053 | 32767 | 7248 | 24173 |
| 109 | 4392 | 13546 | 24082 | 32767 | 7571 | 25252 |
| 110 | 4589 | 14151 | 25157 | 32767 | 7909 | 26380 |
| 111 | 4793 | 14783 | 26280 | 32767 | 8262 | 27557 |
| 112 | 5007 | 15442 | 27452 | 32767 | 8631 | 28786 |
| 113 | 5231 | 16132 | 28678 | 32767 | 9016 | 30072 |
| 114 | 5464 | 16851 | 29957 | 32767 | 9419 | 31413 |
| 115 | 5708 | 17603 | 31294 | 32767 | 9839 | 32767 |
| 116 | 5963 | 18389 | 32691 | 32767 | 10278 | 32767 |
| 117 | 6229 | 19210 | 32767 | 32767 | 10737 | 32767 |
| 118 | 6507 | 20067 | 32767 | 32767 | 11216 | 32767 |
| 119 | 6797 | 20963 | 32767 | 32767 | 11717 | 32767 |
| 120 | 7101 | 21899 | 32767 | 32767 | 12240 | 32767 |
| 121 | 7418 | 22876 | 32767 | 32767 | 12786 | 32767 |
| 122 | 7749 | 23897 | 32767 | 32767 | 13356 | 32767 |
| 123 | 8095 | 24964 | 32767 | 32767 | 13953 | 32767 |
| 124 | 8456 | 26078 | 32767 | 32767 | 14576 | 32767 |
| 125 | 8833 | 27242 | 32767 | 32767 | 15226 | 32767 |
| 126 | 9228 | 28457 | 32767 | 32767 | 15906 | 32767 |
| 127 | 9639 | 29727 | 32767 | 32767 | 16615 | 32767 |
QDesign Music 2 (QDM2)
QDesign published no specification; the only description is FFmpeg’s open source decoder (libavcodec/qdm2.c with
qdm2data.h and qdm2_tablegen.h). The explorer’s port equals FFmpeg’s output on FATE’s real file (stereo,
12.8 s, 44.1 kHz, 32 kbit/s): all but 541 of 1,130,496 samples are identical and the rest differ by 1 (FFmpeg computes in 32-bit floats,
the port rounds at the same stores but computes between them in doubles).
Container
- A
wavechunk holds QuickTime atoms:frma(QDM2), thenQDCA(36 bytes, big-endian): unknown (1), channels, sample rate, bit rate, group size (samples a channel in a packet, 4096 in the sample), FFT size (256; 64, 128 and 256 occur; 2 × FFT size is the transform length), packet size (370 bytes), then aQDCPatom of tuning values the decoder ignores.SSNDis a run of packets of exactly the packet size. - Where the words are in the
wavechunk: with the 12-bytefrmaatom first and the 8-byte header of theQDCAatom after it, the 36 bytes begin at byte 20 of the chunk, so group size is the u32 at byte 36 and packet size the u32 at byte 44. FFmpeg takes exactly these two words (block duration and block size) from the chunk when it is at least 48 bytes long; everything else, for QDMC and QDM2 alike, it leaves to the codec. numSampleFramescounts packets (138 in the sample); a packet gives group size samples a channel.- QCELP (
Qclp,Qclq, QUALCOMM PureVoice) keeps its one parameter in the same chunk: byte 24 is a rate letter,Hhalf rate (17-byte packets) and any other value,Ffull rate among them, full rate (35-byte packets); every packet holds 160 samples, and a file with nowavechunk is read as full rate. The explorer namesQclqbut does not decode it; it decodesQclp(the sound data is read in units of 35 bytes, or 17 at half rate, each a packet led by its rate byte (35, 17, 8, 4 or 1 bytes) with padding after it, as QuickTime’s sound description gives, and the packets of FFmpeg’s FATE QCP sample in such units decode to FFmpeg’s samples within 1 in 32,768). - From the sizes: frame size = group size / 16; sub-sampling = log2(FFT size) − 6 (0 to 2); 8, 16 or 30 sub-bands carry sound (30 at sub-sampling 2); the “coding method” table row is chosen from the bit rate against 40, 48, 56, 72, 80 or 100 times 1000, 1440, 1760 and 2240, and the coefficient table row from the bit rate (up to 8 kbit/s, below 16 kbit/s, above).
A packet
A packet is one super block and is played as 16 steps of frame-size samples. Its first bytes are a sub-packet header: a type
(one byte; bit 7 means the size is 16 bits; type 0x7F adds a second type byte) and a size. The super block type (2 to 7) says whether
tone coding is of the ordinary kind (2, 3) and whether a checksum follows (2, 4, 5: two bytes 257 × a + 2 × b, minus every
byte of the packet, must be 0 mod 65536). Inside the super block, sub-packets (read least significant bit first) are: types 9 to 12, which
describe sub-band samples (9: quantised coefficients, 10: tone level indexes, 11 and 12: the coding methods and the samples, noise-filled
where a method has no data); 13 and 14, six FFT level exponents; and 16 to 47, FFT tones (an offset, a level exponent, a phase and, in
stereo, a second channel’s differences). Type 8 and 15 are not handled by any decoder.
Sound
- FFT tones are added up in a spectrum of FFT-size complex bins, per step, with envelope tables over 1 to 30 steps; an inverse real FFT of 2 × FFT size points (scaled by one half) is overlapped with the previous step’s second half.
- Sub-band samples (tone level × a coded or noise sample) go through the 32-band polyphase synthesis filter of MPEG audio (the standard’s matrixing and window); sub-bands above those used are zero. Its output is added to the FFT sound.
- The sum is truncated to an integer and soft-clipped above 27,600 by a table of sines up to 35,716, hard-clipped to ±32,767.
- The codes are Huffman-like tables given as (symbol, length) pairs: the code of each entry is the sum of 2−length of the
entries before it, read most significant bit first from the least-significant-bit-first stream; symbol 0 is an escape (3 bits, then that
many plus one bits). Tone-offset tables get a second stage: a value of 4 or more reads
value / 4more bits and adds a base from a 60-entry table. The tables are inqdm2data.hand are in the explorer’sshared/audio/qdm2.js, verified equal to the header by script. - Two behaviours of FFmpeg are kept because they define the output: sub-packet 12 never supplies samples (its bit reader is opened with length 0, so those sub-bands are noise), and the super block type 4 to 7 (not 2 or 3) coding method case ends in an error.
QDMC (QDesign Music version 1) is described by FFmpeg’s qdmc.c only, ported to the explorer
(2026-11-19). It was checked on MPlayer’s sample site’s two QuickTime movies with QDMC audio (A-codecs/QDMC/slick.mov,
rumcoke.mov); their packets, with the frma and QDCA atoms of the movie’s sound description, wrapped in an AIFF-C
wave chunk as QuickTime does for QDM2, decode to FFmpeg’s samples within 1 in 32,768. A frame is 556 bytes of 8,192 samples a channel (44.1 kHz stereo, 24 kbit/s).
Frames, markers and saxels of Apple’s compression types
From Appendix C of the AIFF-C draft. The frame is the basic unit of compressed data.
| Type | Frame size | Expanded samples a frame | Marker positions step |
|---|---|---|---|
MAC3 (MACE 3:1) | 2 bytes | 6 | offset 0, 2, 4, 6 … is position 0, 6, 12, 18 … |
MAC6 (MACE 6:1) | 1 byte | 6 | offset 0, 1, 2, 3 … is position 0, 6, 12, 18 … |
ACE2 (Apple IIGS ACE 2:1) | 1 byte | 2 | offset 0, 1, 2 … is position 0, 2, 4 … |
ACE8 (Apple IIGS ACE 8:3) | 3 bytes | 8 | offset 0, 3, 6 … is position 0, 8, 16 … |
- Markers (and loop points) are positions in the expanded sound, not in the compressed frames. The four utilities are linear, so the position is the offset times the ratio above. A marker that is not a multiple of the ratio (position 19 in MACE 3:1) is allowed: the player expands the frame, drops the first samples and stops before the last.
- Several channels store a sample frame of compressed sound in the place of an uncompressed sample point: for stereo MACE 6:1 and ACE 2:1, one byte of channel 1 then one of channel 2; for ACE 8:3, three bytes of channel 1 then three of channel 2.
- The saxel data of these four types is the previous 48 frames of compressed sound before the marker (or all of them when there are fewer; none for a marker at the start). See SAXL.
Source: the five types NONE, ACE2, ACE8, MAC3 and MAC6 with their names, and the frame sizes, marker positions and saxel rule: Apple, AIFF-C draft, section 4.0 (page 10), Appendix C (pages 33 to 35) and Appendix D (pages 38 and 39). Every other row: the project’s reading of libsndfile’s aiff.c, FFmpeg’s aiff-tags.c and McGill MMSP’s AIFF notes, as the “Listed by” column says; the algorithms are from FFmpeg’s and libsndfile’s source because Apple publishes none for MACE, IMA4 or QDesign.