Structs
A structure to hold a buffer of audio data.
struct AudioBuffer {
UInt32 mNumberChannels;
UInt32 mDataByteSize;
void* mData;
} ;
Field Descriptions
- mNumberChannels
- The number of interleaved channels in the buffer.
- mDataByteSize
- The number of bytes in the buffer pointed at by mData.
- mData
- A pointer to the buffer of audio data.
A variable length array of AudioBuffer structures.
struct AudioBufferList {
UInt32 mNumberBuffers;
AudioBuffer mBuffers[kVariableLengthArray];
} ;
Field Descriptions
- mNumberBuffers
- The number of AudioBuffers in the mBuffers array.
- mBuffers
- A variable length array of AudioBuffers.
This structure describes a single channel.
struct AudioChannelDescription {
AudioChannelLabel mChannelLabel;
UInt32 mChannelFlags;
Float32 mCoordinates[3];
} ;
Field Descriptions
- mChannelLabel
- The AudioChannelLabel that describes the channel.
- mChannelFlags
- Flags that control the interpretation of mCoordinates.
- mCoordinates
- An ordered triple that specifies a precise speaker location.
This structure is used to specify channel layouts in files and hardware.
struct AudioChannelLayout {
AudioChannelLayoutTag mChannelLayoutTag;
UInt32 mChannelBitmap;
UInt32 mNumberChannelDescriptions;
AudioChannelDescription mChannelDescriptions[kVariableLengthArray];
} ;
Field Descriptions
- mChannelLayoutTag
- The AudioChannelLayoutTag that indicates the layout.
- mChannelBitmap
- If mChannelLayoutTag is set to kAudioChannelLayoutTag_UseChannelBitmap, this
field is the channel usage bitmap.
- mNumberChannelDescriptions
- The number of items in the mChannelDescriptions array.
- mChannelDescriptions
- A variable length array of AudioChannelDescriptions that describe the
layout.
This structure is used to describe codecs installed on the system.
struct AudioClassDescription {
OSType mType;
OSType mSubType;
OSType mManufacturer;
} ;
Field Descriptions
- mType
- The four char code codec type.
- mSubType
- The four char code codec subtype.
- mManufacturer
- The four char code codec manufacturer.
This structure encapsulates all the information for describing the basic
format properties of a stream of audio data.
struct AudioStreamBasicDescription {
Float64 mSampleRate;
UInt32 mFormatID;
UInt32 mFormatFlags;
UInt32 mBytesPerPacket;
UInt32 mFramesPerPacket;
UInt32 mBytesPerFrame;
UInt32 mChannelsPerFrame;
UInt32 mBitsPerChannel;
UInt32 mReserved;
} ;
Discussion
This structure is sufficient to describe any constant bit rate format that has
channels that are the same size. Extensions are required for variable bit rate
data and for constant bit rate data where the channels have unequal sizes.
However, where applicable, the appropriate fields will be filled out correctly
for these kinds of formats (the extra data is provided via separate properties).
In all fields, a value of 0 indicates that the field is either unknown, not
applicable or otherwise is inapproprate for the format and should be ignored.
Note that 0 is still a valid value for most formats in the mFormatFlags field.
In audio data a frame is one sample across all channels. In non-interleaved
audio, the per frame fields identify one channel. In interleaved audio, the per
frame fields identify the set of n channels. In uncompressed audio, a Packet is
one frame, (mFramesPerPacket == 1). In compressed audio, a Packet is an
indivisible chunk of compressed data, for example an AAC packet will contain
1024 sample frames.
Field Descriptions
- mSampleRate
- The number of sample frames per second of the data in the stream.
- mFormatID
- A four char code indicating the general kind of data in the stream.
- mFormatFlags
- Flags specific to each format.
- mBytesPerPacket
- The number of bytes in a packet of data.
- mFramesPerPacket
- The number of sample frames in each packet of data.
- mBytesPerFrame
- The number of bytes in a single sample frame of data.
- mChannelsPerFrame
- The number of channels in each frame of data.
- mBitsPerChannel
- The number of bits of sample data for each channel in a frame of data.
- mReserved
- Pads the structure out to force an even 8 byte alignment.
This structure describes the packet layout of a buffer of data where the size of
each packet may not be the same or where there is extraneous data between
packets.
struct AudioStreamPacketDescription {
SInt64 mStartOffset;
UInt32 mVariableFramesInPacket;
UInt32 mDataByteSize;
} ;
Field Descriptions
- mStartOffset
- The number of bytes from the start of the buffer to the beginning of the
packet.
- mVariableFramesInPacket
- The number of sample frames of data in the packet. For formats with a
constant number of frames per packet, this field is set to 0.
- mDataByteSize
- The number of bytes in the packet.
A strucutre that holds different representations of the same point in time.
struct AudioTimeStamp {
Float64 mSampleTime;
UInt64 mHostTime;
Float64 mRateScalar;
UInt64 mWordClockTime;
SMPTETime mSMPTETime;
UInt32 mFlags;
UInt32 mReserved;
} ;
Field Descriptions
- mSampleTime
- The absolute sample frame time.
- mHostTime
- The host machine's time base (see ).
- mRateScalar
- The ratio of actual host ticks per sample frame to the nominal host ticks
per sample frame.
- mWordClockTime
- The word clock time.
- mSMPTETime
- The SMPTE time.
- mFlags
- A set of flags indicating which representations of the time are valid.
- mReserved
- Pads the structure out to force an even 8 byte alignment.
This structure holds a pair of numbers that represent a continuous range of
values.
struct AudioValueRange {
Float64 mMinimum;
Float64 mMaximum;
} ;
Field Descriptions
- mMinimum
- The minimum value.
- mMaximum
- The maximum value.
This stucture holds the buffers necessary for translation operations.
struct AudioValueTranslation {
void* mInputData;
UInt32 mInputDataSize;
void* mOutputData;
UInt32 mOutputDataSize;
} ;
Field Descriptions
- mInputData
- The buffer containing the data to be translated.
- mInputDataSize
- The number of bytes in the buffer pointed at by mInputData.
- mOutputData
- The buffer to hold the result of the translation.
- mOutputDataSize
- The number of bytes in the buffer pointed at by mOutputData.
A structure for holding a SMPTE time.
struct SMPTETime {
SInt16 mSubframes;
SInt16 mSubframeDivisor;
UInt32 mCounter;
UInt32 mType;
UInt32 mFlags;
SInt16 mHours;
SInt16 mMinutes;
SInt16 mSeconds;
SInt16 mFrames;
} ;
Field Descriptions
- mSubframes
- The number of subframes in the full message.
- mSubframeDivisor
- The number of subframes per frame (typically 80).
- mCounter
- The total number of messages received.
- mType
- The kind of SMPTE time using the SMPTE time type constants.
- mFlags
- A set of flags that indicate the SMPTE state.
- mHours
- The number of hourse in the full message.
- mMinutes
- The number of minutes in the full message.
- mSeconds
- The number of seconds in the full message.
- mFrames
- The number of frames in the full message.
(Last Updated 12/13/2004)