Core Audio Data Types

This document describes data types and constants used throughout Core Audio, as well as some convenience functions for working with these types and constants.


If you are unfamiliar with the specialized terminology used when manipulating audio data, refer to Core Audio Glossary.


Data Types

struct AudioBuffer

Holds and describes a buffer of audio data.

struct AudioBufferList

Holds a variable-length array of AudioBuffer structures.

struct AudioChannelDescription

Describes an audio data channel.

typealias AudioChannelLabel

Identifies how an audio data channel is to be used.

struct AudioChannelLayout

Specifies a channel layout in a file or in hardware.

typealias AudioChannelLayoutTag

Identifies a previously-defined channel layout.

struct AudioClassDescription

Describes an installed codec.

typealias AudioSampleType

The canonical audio data sample type for input and output.

struct AudioStreamBasicDescription

An audio data format specification for a stream of audio.

struct AudioStreamPacketDescription

Describes one packet in a buffer of audio data where the sizes of the packets differ or where there is non-audio data between audio packets.

struct AudioTimeStamp

Holds multiple representations of a time stamp.

typealias AudioUnitSampleType

The canonical audio data sample type for audio processing.

struct AudioValueRange

Holds a pair of numbers that represent a continuous range of values.

struct AudioValueTranslation

Holds buffers used in translation operations.

struct SMPTETime

Specifies a time stamp as one of the SMPTE time types.


Sample Type Constants

Constants used for specifying audio format flags


Indicates that an audio format can use any sample rate.

Audio Data Format Identifiers

Identifiers for audio data formats, used in the AudioStreamBasicDescription structure.

AudioStreamBasicDescription Flags

Standard flags for use in the mFormatFlags field of the AudioStreamBasicDescription structure.

AudioStreamBasicDescription Flag Combinations Constants

Commonly used combinations of data format flags for the AudioStreamBasicDescription structure.

MPEG-4 Audio Object Type Constants

Used in the mFormatFlags field of an AudioStreamBasicDescription structure that describes an MPEG-4 audio stream to specify the type of MPEG-4 audio data.

SMPTE Timecode Type Constants

SMPTE timecode types, used in the SMPTETime structure.

SMPTE State Flags

Flags that describe a SMPTE time state.

Audio Time Stamp Flags

These flags indicate the valid fields in an AudioTimeStamp structure.

Audio Time Stamp Flag Combination Constant

A commonly used combination of audio time stamp flags.

Audio Channel Label Constants

Channel labels for use in the mChannelLabel field of an AudioChannelDescription structure.

Channel Bitmap Constants

Channel bits for use in the mChannelBitmap field of an AudioChannelLayout structure.

Channel Coordinate Flags

Used in the mChannelFlags field of an AudioChannelDescription structure.

enum AudioChannelCoordinateIndex

Indexes the fields of the mCoordinates array in an AudioChannelDescription structure.

Audio Channel Layout Tags

The identifiers for audio channel layouts.

Result Codes

This table lists result codes returned from the various C-based audio frameworks.

var kAudio_UnimplementedError: OSStatus

An unimplemented system function was called.

var kAudio_ParamError: OSStatus

An error in the parameter list of the function.

var kAudio_MemFullError: OSStatus

Not enough room in the heap zone.