Contains all the information needed for describing streams of audio data.
typedef struct AudioStreamBasicDescription {
Float64 mSampleRate;
UInt32 mFormatID;
UInt32 mFormatFlags;
UInt32 mBytesPerPacket;
UInt32 mFramesPerPacket;
UInt32 mBytesPerFrame;
UInt32 mChannelsPerFrame;
UInt32 mBitsPerChannel;
UInt32 mReserved;
} AudioStreamBasicDescription;
The AudioStreamBasicDescription is the
fundamental descriptive structure in Core Audio. The “Audio Format” API
deals extensively with AudioStreamBasicDescription,
as do most other parts of Core Audio.
CoreAudioTypes.h
These values reflect various audio formats available from
within Core Audio, and are used to populate the mFormatID field
in AudioStreamBasicDescription instances.
kAudioFormatLinearPCM = 'lpcm' |
kAudioFormatAC3 = 'ac-3' |
kAudioFormat60958AC3 ='cac3' |
kAudioFormatMPEG = 'mpeg' |
kAudioFormatAppleIMA4 = 'ima4' |
kAudioFormatMPEG4AAC = 'aac ' |
kAudioFormatMPEG4CELP = 'celp' |
kAudioFormatMPEG4HVXC = 'hvxc' |
kAudioFormatMPEG4TwinVQ = 'twvq' |
kAudioFormatTimeCode = 'time' |
kAudioFormatMIDIStream = 'midi' |
kAudioFormatParameterValueStream = 'apvs' |
These values are used to fill the mFormatFlags field
of an AudioStreamBasicDescription, and reflect the
formatting of the audio stream data.
Standard flags:
kAudioFormatFlagIsFloat = (1L << 0) |
kAudioFormatFlagIsBigEndian = (1L << 1) |
kAudioFormatFlagIsSignedInteger = (1L << 2) |
kAudioFormatFlagIsPacked = (1L << 3) |
kAudioFormatFlagIsAlignedHigh = (1L << 4) |
kAudioFormatFlagIsNonInterleaved = (1L << 5) |
kAudioFormatFlagsAreAllClear = (1L << 31) |
Linear PCM flags:
kLinearPCMFormatFlagIsFloat = kAudioFormatFlagIsFloat |
kLinearPCMFormatFlagIsBigEndian = kAudioFormatFlagIsBigEndian |
kLinearPCMFormatFlagIsSignedInteger = kAudioFormatFlagIsSignedInteger |
kLinearPCMFormatFlagIsPacked = kAudioFormatFlagIsPacked |
kLinearPCMFormatFlagIsAlignedHigh = kAudioFormatFlagIsAlignedHigh |
kLinearPCMFormatFlagIsNonInterleaved = kAudioFormatFlagIsNonInterleaved |
kLinearPCMFormatFlagsAreAllClear = kAudioFormatFlagsAreAllClear |
Last updated: 2004-03-25