Sets the value of the audio volume starting at the specified time.
SDKs
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
Framework
- AVFoundation
Declaration
- (void)setVolume:(float)volume atTime:(CMTime)time;
Parameters
volume
The volume. The value must be between
0
and.0 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.