Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Audio Stream Basic Description

AudioStreamBasicDescription

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;

Discussion

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.

Availability
Declared In
CoreAudioTypes.h

In this section:

Format IDs
Format Flags


Format IDs

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'

Format Flags

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


< Previous PageNext Page > Hide TOC


Last updated: 2004-03-25




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice