Expand description
Apple Lossless (ALAC) audio decoder.
Decodes ALAC packets (one frame each, as MP4, CAF and Matroska store them)
from the 24-byte ALACSpecificConfig magic cookie given as extradata. Bit
depths 16, 20, 24 and 32, 1 to 8 channels. Output is interleaved: s16 for
16-bit streams, f32 for deeper ones (exact for 20 and 24 bits).
The arithmetic follows FFmpeg’s alac.c (adaptive Golomb-Rice residuals,
the adaptive FIR predictor, stereo decorrelation, shifted low bytes), and
channels are reordered from ALAC’s layout (C L R …) to the WAV/FFmpeg
order (L R C LFE …) the same way.
A malformed frame is an error for that packet only; the decoder keeps no state between frames, so the next packet decodes normally.
Structs§
- Alac
Config - The fields of
ALACSpecificConfigthe decoder uses.
Functions§
- register
- Register the ALAC decoder into a
CodecRegistry.