This class lets you to deal with the sound channels created with the the appropriate of the class.
The QTPlgChannelAudio allows you to gain access to the new sequence grabber channel component for audio which allows capture of high–resolution audio, supporting multi–channel, high sample rate, high accuracy sound. For more details about the new features provided by such a component consult the official Apple documentation
This class requires QuickTime 7 or later and MacOS X.
→ → → →
The QTPlgChannelAudio class constructors are called when you create a new instance of the class, while the ˜QTPlgChannelAudio 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. You will obtain valid instances of this class only from the list of the class when the class property is set to true.
The class provides you with the following initializer methods:
(other as QTPlgChannelAudio)
This is the copy constructor. The properties of the object to be copied will be used to initialize the
new class instance properties
determines if your application gains exclusive access to the selected
determines if your application gains exclusive access to the selected
specifies the number of seconds of audio that the channel should buffer before writing
returns a block of data that represents an array of integer values; you can obtain the number of values by dividing the size of
memoryblock by the size of a integer (that is 4 bytes). This property allows a client to enable
or disable channels on a
,
as well as reorder them or duplicate them to several output channels. This property need not be set if a client wishes to capture all
channels from the record device (this is the default behavior). Each element in the array represents one output bus (into the
audio channel) from the record device. The value of each element is the source channel (zero–based) on the input device that should
feed the specified output. Follows a list of examples that illustrate the usage of the channelMap property:
- Example 1: to capture just the 1st, 3rd, and 5th channels from a 6–channel input device, the channel map should be {0,2,4}
- Example 2: to capture both channels from a stereo input device, knowing that the left and right channels are reversed in the data source, the channel map should be set to {1,0}
- Example 3: to duplicate the second source channel into 4 outputs, the channel map should be set to {1,1,1,1}
- Example 4: to produce a conformant stream of audio, say, a 6–channel stream to send to an external 5.1 AC3 encoder, but having audio only for the L, R, and C channels (on record device channels 0, 1, and 2), the channel map should be set to {0,1,2,–1, –1,–1 }. The last 3 channels will be filled with silence
a collection of objects that reports the
available input sources for the selected
a collection of objects that reports the
available output destinations for the selected
a collection of objects
that describe valid combinations of settings supported by the physical record device in its current configuration
(,
,
)
determines the current input selection in recording devices that allow switching between data sources, such as
analog
, adat
,
sdi
, aes/ebu
, and spdif
. You must use one of the
obtained from the
list
determines the current output selection in input sources that allow switching between output destinations, such as
analog
,
adat
, sdi
, aes/ebu
, and spdif
. You must use one of the
obtained from the
list
determines the format of the audio as it will be written to the destination QuickTime movie track. You must use one of the
obtained from the
list
determines the spatial or discrete channel layout referred to the channels in the resulting QuickTime movie sound track
determines if metering is active. The target index accepts one of the
provided by the class and
lets you to specify wich of the supported targets you want to control metering. Setting the index to
kTargetPreviewDevice or kTargetRecordDevice, turns device level metering on or off; setting it
to kTargetChannel, turns output level metering on or off. When level meters are enabled, you can use
to get instantaneous levels, or
to get peak–hold style meters,
which are better for clipping detection. Level meters should be enabled only if you intend to poll for levels, because they place an
added load on the CPU when enabled.
returns a block of data that represents an array of single values; you can obtain the number of values by dividing the size of
memoryblock by the size of a single (that is 4 bytes). These values represent, in dB,
the peak hold levels for each channel on a device or output. This property may be used only when level meters are enabled
(by using ). Poll for peak hold levels as
often as you would like, to update the user interface or look for clipping. The number of elements in the array will be equal to
the number of input channels on your record device for target set to kTargetRecordDevice,
or the number of elements in your channel map, if you've set one. It will be equal to the number of output channels on your preview device
for target set to kTargetPreviewDevice and equal to the
in your
for target
set to kTargetChannel. If no channel mixdown is being performed between record device and output formats, then the
peak hold levels values for kTargetRecordDevice and kTargetChannel will be equivalent.
If you have requested hardware playthrough, level metering will be unavailable.
returns a block of data that represents an array of single values; you can obtain the number of values by dividing the size of
memoryblock by the size of a single (that is 4 bytes). These values represent,in dB,
the average power levels for each channel on a device or output. This property may be used only when level meters are enabled
(by using ). Poll for average power levels as often
as you would like, to update the user interface. The number of elements in the array will be equal to
the number of input channels on your record device for target set to kTargetRecordDevice,
or the number of elements in your channel map, if you've set one. It will be equal to the number of output channels on your preview device
for target set to kTargetPreviewDevice and equal to the
in your
for target
set to kTargetChannel.
If no channel mixdown is being performed between record device and output formats, then the
average power levels values for kTargetRecordDevice and kTargetChannel will be equivalent.
If you have requested hardware playthrough, level metering will be unavailable.
the target is the audio channel itself
the target is the preview device
the target is the recording device