The AudioStreamBasicDescription Core Audio structure contains all the information for describing the basic format properties of a stream of audio data.
The QTPlgAudioStreamDesc class provides you with properties and methods that let you whether access or create new instances of such a Core Audio description structure. Mostly, you will use instances of this class along with the property of the class, to get or set informations about the characteristics of a stream of audio data.
This class requires QuickTime 7 or later.
The QTPlgAudioStreamDesc class constructors are called when you create a new instance of the class, while the ˜QTPlgAudioStreamDesc class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used.
The class provides you with the following initializer methods:
()
This is the default constructor. Use this constructor to create a completely new data descriptor container in memory
(other as QTPlgAudioStreamDesc)
This is the copy constructor. The properties of the object to be copied will be used to initialize the
new class instance properties
returns a pointer to the built–in AudioStreamBasicDescription Core Audio structure; useful for Toolbox programmers
(use with care: you could invalidate the handle causing unpredictable results
(probably an application crash))
a four char code indicating the general kind of data in the stream (i.e. the Linear PCM stream format is identified by the
"lpcm" string)
specifies an opaque data structures representing get or set compressor–specific out–of–band settings. This property is applicable
only to compressed that use a cookie, such as AAC and AMR
specifies the number of sample frames per second of the data in the stream
specifies the number of bytes in a packet of data
specifies the number of sample frames in each packet of data. In uncompressed audio, a packet is
one frame, (framesPerPacket is 1). In compressed audio, a packet is an indivisible chunk of compressed data (i.e. an AAC packet
will contain 1024 sample frames)
specifies the number of bytes in a single sample frame of data
determines the number of channels in each frame of data. In audio data a frame is one sample across all channels. In non–
audio, this property, along with the property,
identify one channel. In audio,
these properties identify the set of n channels
specifies the number of bits of sample data for each channel in a frame of data
specifies if the data of the audio stream are represented as floating point numbers. Set to false for integer values
specifies if the byte order of data is big endian. Set to false for little endian order
specifies if the data of the audio stream are represented as signed integer numbers. Set to false for unsigned integer values.
This property is valid only if the property is set to
false
specifies if the sample bits occupy the entire available bits for the channel. Set to false if they are high or low aligned
within the channel
indicates if the sample bits are placed into the high bits of the channel. Set to false for low bit placement.
This property is valid only if the property is set to
false
indicates if the samples for each channel are located contiguously and the channels are layed out end to end; Set to false if
the samples for each frame are layed out contiguously and the frames layed out end to end