Sustainability of Digital Formats: Planning for Library of Congress Collections

Introduction | Sustainability Factors | Content Categories | Format Descriptions | Contact
Format Description Categories >> Browse Alphabetical List

Apple Core Audio Format

>> Back
Table of Contents
Format Description Properties Explanation of format description terms

Identification and description Explanation of format description terms

Full name Apple Core Audio Format
Description

Apple's Core Audio Format (CAF) is a container file format for storing and transporting digital audio data. CAF files can serve as a wrapper for a variety of audio data formats. The specification states "the flexibility of the CAF file structure and the many types of metadata that can be recorded enable CAF files to be used with practically any type of audio data."

CAF files can store any number of audio channels. CAF files do not have file-size limitations and can hold more than 4GB of data, in contrast to other popular audio formats like AIFF or WAV. As stated by the specification, CAF uses 64-bit file offsets to eliminate these limits.

The specification states that CAF files can append new audio data to the end of a file "in a manner that allows it to determine the amount of data even if the size field in the header has not been finalized." This was also developed in contrast with other popular audio formats that require updating a data header at the end of a recording or after recording each packet of data. The specification notes the benefits here as efficiency when writing data and integrity when updating the size field.

CAF can store additional data beyond audio. The specification lists "text annotations, markers, channel layouts, and many other types of information that can help in the interpretation, analysis, or editing of the audio." CAF files have a feature in which the metadata is linked to the audio data through an edit count value. This value can determine when metadata has a dependency on the audio data and, furthermore, when the audio data has changed since the metadata was written In iOS 5.0 and later, CAF files can be used to define patches, or musical voice configurations, for software-based music synthesizers such as the iOS Sample Player audio unit.

The target application for CAF files is the Apple operating system. Adobe Audition Creative Cloud 2018+ also notes that it generally supports CAF, which can be used on other operating systems.

CAF files begin with a header followed by a series of chunks, as per the specification. The header identifies the file type and the CAF version. CAF files have a simple header structure with three fields: mFileType (must be set to 'caff'), mFileVersion (must be set to 1, assuming Version 1.0 of the spec, which is the only version), and mFileFlags, currently not used and must be set to 0 (for Version 1.0).

Each repeating chunk contains its own header and the chunk data. Each chunk header defines the chunk type and data section size. The chunk type is a four-character code indicating the chunk's type. The data section size is a number indicating the chunk size in bytes.

The only two chunk types required for every CAF file are the Audio Description chunk and the Audio Data chunk, which specifies the audio data format. The Audio Description chunk must be the first chunk following the file header. The Audio Description chunk includes mSampleRate, mFormatID, mFormatFlags, mBytesPerPacket, mFramesPerPacket, mChannelsPerFrame, and mBitsPerChannel values. The specification includes the following values in the mFormatID field, but notes that the list is not exhaustive: 'lpcm', 'ima4', 'aac ' (the trailing space is intentional), 'MAC3', 'MAC6', 'ulaw', 'alaw', '.mp1', '.mp2', '.mp3', and 'alac'.

The Audio Data chunk can appear anywhere else in the file, unless the size of its data section is undetermined. In that case, the size field in the Audio Data chunk header is set to "-1" and the Audio Data chunk must come last in the file so that the end of the audio data chunk is the same as the end of the file. Audio is stored in the Audio Data chunk as a sequential series of packets. An audio packet in a CAF file contains one or more frames of audio data.

If audio packets vary in size, a Packet Table chunk is required. If a file has more than two channels, a Channel Layout chunk is required.

The nature and format of the chunk data is specific to each type of chunk. The format of the data in a chunk depends on the chunk type. The format of the audio data depends on the data type. All of the other fields in a CAF file are stored in big-endian byte order.

Some additional chunks that may be found, depending on file conditions:

  • Magic Cookie Chunk: "Some compressed audio data formats require additional codec-specific data in order to decode the audio data. If the audio format requires this data, the file must have a Magic Cookie chunk."
  • Strings Chunk: "Some chunks refer to text strings held in the Strings chunk."
  • Marker Chunk: "holds individual markers"
  • Region Chunk: "delineate segments of the audio data"
  • Instrument Chunk: "describe aspects of the audio data needed when the audio is used by a sampler or played as an instrument"
  • MIDI Chunk: "store all of the information in a standard MIDI file"
  • Overview Chunk: "samples of the data useful for displaying the audio at a particular resolution"
  • Peak Chunk: "list the peak amplitude in each channel and specify the frame in which that amplitude occurs"
  • Edit Comments Chunk: "hold time-stamped comments added when the data is edited"
  • Information Chunk: "text strings that provide information about the audio data, such as key signature, artist, and title"
  • Unique Material Identifier Chunk: "provides a unique identifier for the audio data in a CAF file"
  • User-Defined Chunk: "provides a universally unique ID (UUID) for a new chunk type"
  • Free Chunk: "no data, but reserves space that you can use later."

The specification notes the Edit Comments Chunk and Information Chunk require the appropriate time of day data format.

CAF supports a wide range of other chunk types, which can be placed in any order in the file except first (which is reserved for the Audio Description chunk) or last (when the Audio Data chunk size field is set to "-1"). Some chunk types can be used more than once in a file. Some refer to—or are referred to by—chunks of other types. Refer to the specification for more details.

Production phase Used for content in initial, middle, and final states.
Relationship to other formats
    May contain LPCM, Linear Pulse Code Modulated Audio (LPCM)
    May contain AAC_MP4, Advanced Audio Coding (MPEG-4)
    May contain MPEG_layer_2_audio, MPEG-1 and MPEG-2 Layer II Audio Encoding
    May contain MP3_ENC, MP3 (MPEG Layer III Audio Encoding)
    Used by DAMF, Dolby Atmos Master File
    May contain Apple’s implementation of IMA 4:1 ADPCM, MACE 3:1, MACE 6:1, μLaw 2:1, aLaw 2:1, and Apple Lossless. Not described at this time.

Local use Explanation of format description terms

LC experience or existing holdings The Library of Congress has a small amount of CAF files in its collections.
LC preference See the Library of Congress Recommended Formats Statement for format preferences for audio works.

Sustainability factors Explanation of format description terms

Disclosure Fully disclosed along with helpful contextual statements, by Apple Inc.
    Documentation Apple Core Audio Format Specification 1.0.
Adoption Apple, Inc. writes that CAF is "fully supported by Core Audio APIs in OS X v10.4 and later and in OS X v10.3 with QuickTime 7 or later. It is supported in iOS starting in iOS 5.0."
    Licensing and patents No known licenses or patents on the format. Comments welcome.
Transparency Depends upon algorithms and tools to read; requires sophistication to build tools.
Self-documentation Header includes self-identification and specification version number. There are other fields where descriptive metadata can be included, as well as the inclusion of unique identifiers.
External dependencies None.
Technical protection considerations None.

Quality and functionality factors Explanation of format description terms

Sound
Normal rendering Good support.
Fidelity (high audio resolution) No restrictions by this container format; it depends on the embedded audio content.
Multiple channels No restrictions by this container format; it depends on the embedded audio content. The specification notes "If a file has more than two channels, a Channel Layout chunk is required."
Support for user-defined sounds, samples, and patches According to the specification: "Starting in iOS 5.0, you can use CAF files created in OS X that define patches, or musical voice configurations, for software-based music synthesizers such as the iOS Sample Player audio unit."

File type signifiers and format identifiers Explanation of format description terms

Tag Value Note
Filename extension caf
While the file extension is implied by the specification, it is not definitely mentioned. Sources such as Wikipedia, Wikidata and ArchiveTeam all consider .caf as the format's extension. Comments welcome.
Internet Media Type audio/x-caf
See Wikidata and ArchiveTeam.
Magic numbers Hex: 63616666
ASCII: caff
Apple Core Audio Format Specification 1.0 section "CAF File Header and Chunk Headers" states that the CAFFileHeader stores mFileType, defined "The file type. This value must be set to 'caff'. You should consider only files with the mFileType field set to 'caff' to be valid CAF files."
Uniform Type Identifier (Mac OS) com.apple.coreaudio-format
From Apple's System-Declared Uniform Type Identifiers.
Pronom PUID fmt/416
See https://www.nationalarchives.gov.uk/PRONOM/fmt/416.
Wikidata Title ID Q2997216
See https://www.wikidata.org/wiki/Q2997216

Notes Explanation of format description terms

General  
History Apple Core Audio Format Specification 1.0 has an initial date of June 4, 2005 with updates in March 2006 and October 2011.

Format specifications Explanation of format description terms


Useful references

URLs


Last Updated: 04/25/2025