Apple Lossless Audio Codec
A lossless audio codec developed by Apple, typically embedded in MPEG-4 audio files; when decoded, it restores the original PCM samples.
Explanation
Apple Lossless Audio Codec (ALAC, Apple 无损音频编解码器) is a lossless audio codec developed by Apple. It was introduced in 2004 alongside products such as iTunes 4.5 and was initially designed primarily for Apple devices and software; Apple released the encoder, decoder, and file format specifications in 2011.
ALAC divides PCM samples into frames, uses linear prediction to estimate the current sample, and then performs lossless encoding on the prediction residual. The encoder can select the prediction order and parameters based on audio characteristics, and the decoder restores the exact same integer-sampled data based on the frame header. The compression ratio varies depending on the musical content, bit depth, and channel correlation; setting different encoding strategies should not alter the data after correct decoding.
ALAC is the encoding format, not the `.m4a` file extension itself. It is typically encapsulated as an audio track within the ISO Basic Media File Format or MPEG-4 files, often with the `.m4a` file extension; however, the same extension can also contain lossy encodings such as AAC. The container manages timing, tracks, cover art, and tags, while the ALAC stream handles the compression of the audio. To determine whether a file is lossless, you must read the track’s encoding identifier; you cannot rely on the file extension or the player icon.
ALAC supports a variety of sample rates, bit depths, and channel configurations and is widely used in iTunes, Apple devices, and later Apple Music lossless streaming. The fact that a device can recognize M4A files does not mean it supports all ALAC parameters; multichannel, high-sample-rate, or high-bit-depth files may still be subject to limitations imposed by the player, interface, or decoder.
Although ALAC and AAC have similar names, they are not related in the sense that ALAC is a “lossless version of AAC.” AAC uses perceptual coding and permanently discards some information; ALAC aims to fully restore the original PCM. Both ALAC and FLAC can losslessly preserve linear PCM, and the sample rate remains consistent when properly transcoded; the main differences lie in bitrate, the metadata ecosystem, software support, and compression implementation. Converting a lossy source to ALAC will not restore previously lost content.