AVAssetReaderAudioMixOutput Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/AVFoundation.framework |
| Availability | Available in iOS 4.1 and later. |
| Declared in | AVAssetReaderOutput.h |
Overview
AVAssetReaderAudioMixOutput is a concrete subclass of AVAssetReaderOutput that defines an interface for reading audio samples that result from mixing the audio from one or more tracks of an AVAssetReader object's asset.
You can read the audio data mixed from one or more asset tracks by adding an instance of AVAssetReaderAudioMixOutput to an asset reader using addOutput:. The samples can be read in a default format or can be converted to a different format.
Tasks
Creating an Audio Mix Output
Settings
-
audioMixproperty -
audioSettingsproperty -
audioTracksproperty
Properties
audioMix
The output’s audio mix.
Discussion
You use the audio mix to specify how the volume of audio samples read from each source track will change over the timeline of the source asset.
Availability
- Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.haudioSettings
The audio settings used for audio output. (read-only)
Discussion
The dictionary must contain values for keys in AVAudioSettings.h (linear PCM only).
nil indicates that the samples will be returned in the default format.
Availability
- Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.haudioTracks
The tracks from which the receiver reads mixed audio. (read-only)
Discussion
The value is an array of AVAssetTrack objects owned by the target AVAssetReader object’s asset.
Availability
- Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.hClass Methods
assetReaderAudioMixOutputWithAudioTracks:audioSettings:
Returns an instance of AVAssetReaderAudioMixOutput for reading mixed audio from the specified audio tracks, with optional audio settings.
Parameters
- audioTracks
An array of
AVAssetTrackobjects from which the created object should read sample buffers to be mixed.Each track must be one of the tracks owned by the target
AVAssetReaderobject’s asset and must be of media typeAVMediaTypeAudio.- audioSettings
The audio settings to be used for audio output; the dictionary must contain values for keys in
AVAudioSettings.h(linear PCM only).Pass
nilif you want to receive decoded samples in a convenient uncompressed format, with properties determined according to the properties of the specified audio tracks.
Return Value
An instance of AVAssetReaderAudioMixOutput for reading mixed audio from audioTracks, with audio settings specified by audioSettings.
Discussion
Initialization will fail if audioSettings cannot be used with audioTracks.
Availability
- Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.hInstance Methods
initWithAudioTracks:audioSettings:
Initializes an instance of AVAssetReaderAudioMixOutput for reading mixed audio from the specified audio tracks, with optional audio settings.
Parameters
- audioTracks
An array of
AVAssetTrackobjects from which the created object should read sample buffers to be mixed.Each track must be one of the tracks owned by the target
AVAssetReaderobject’s asset and must be of media typeAVMediaTypeAudio.- audioSettings
The audio settings to be used for audio output; the dictionary must contain values for keys in
AVAudioSettings.h(linear PCM only).Pass
nilif you want to receive decoded samples in a convenient uncompressed format, with properties determined according to the properties of the specified audio tracks.
Return Value
An instance of AVAssetReaderAudioMixOutput initialized for reading mixed audio from audioTracks, with audio settings specified by audioSettings.
Discussion
Initialization will fail if audioSettings cannot be used with audioTracks.
Availability
- Available in iOS 4.1 and later.
Declared In
AVAssetReaderOutput.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-10-05)