iOS Developer Library

Developer

AVFoundation Framework Reference AVMutableAudioMixInputParameters Class Reference

Options
Deployment Target:

On This Page
Language:

AVMutableAudioMixInputParameters

Inheritance


Conforms To


Import Statement


Swift

import AVFoundation

Objective-C

@import AVFoundation;

Availability


Available in iOS 4.0 and later.

An AVMutableAudioMixInputParameters object represents the parameters that should be applied to an audio track when it is added to a mix.

  • Creates and returns a mutable input parameters object with no volume ramps and trackID initialized to kCMPersistentTrackID_Invalid.

    Declaration

    Objective-C

    + (AVMutableAudioMixInputParameters *)audioMixInputParameters

    Return Value

    A mutable input parameters object with no volume ramps and trackID initialized to kCMPersistentTrackID_Invalid.

    Import Statement

    Objective-C

    @import AVFoundation;

    Availability

    Available in iOS 4.0 and later.

  • Creates and returns a mutable input parameters object for a given track.

    Declaration

    Swift

    init!(track track: AVAssetTrack!) -> AVMutableAudioMixInputParameters

    Objective-C

    + (AVMutableAudioMixInputParameters *)audioMixInputParametersWithTrack:(AVAssetTrack *)track

    Parameters

    track

    The track to associate with the input parameters object.

    Return Value

    A mutable input parameters object with no volume ramps and trackID set to track’s ID.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • trackID trackID Property

    The ID of the audio track to which the parameters should be applied.

    Declaration

    Swift

    var trackID: CMPersistentTrackID

    Objective-C

    @property(nonatomic) CMPersistentTrackID trackID

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • Sets the value of the audio volume starting at the specified time.

    Declaration

    Swift

    func setVolume(_ volume: Float, atTime time: CMTime)

    Objective-C

    - (void)setVolume:(float)volume atTime:(CMTime)time

    Parameters

    volume

    The volume. The value must be between 0.0 and 1.0.

    time

    The start time at which to set the volume.

    Discussion

    This method adds a volume ramp starting at time. This volume setting remains in effect until the end of the track unless you set a different volume level to start at a later time.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • Sets a volume ramp to apply during a specified time range.

    Declaration

    Swift

    func setVolumeRampFromStartVolume(_ startVolume: Float, toEndVolume endVolume: Float, timeRange timeRange: CMTimeRange)

    Objective-C

    - (void)setVolumeRampFromStartVolume:(float)startVolume toEndVolume:(float)endVolume timeRange:(CMTimeRange)timeRange

    Parameters

    startVolume

    The starting volume. The value must be between 0.0 and 1.0.

    endVolume

    The end volume. The value must be between 0.0 and 1.0.

    timeRange

    The time range over which to apply the ramp.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • The audio processing tap associated with the track.

    Declaration

    Swift

    var audioTapProcessor: MTAudioProcessingTap!

    Objective-C

    @property(nonatomic, retain) MTAudioProcessingTapRef audioTapProcessor

    Discussion

    You can use this property to associate an audio tap with the audio track. You can use the audio tap to access the audio data before it is played, read, or exported.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 6.0 and later.