Retrieves the volume ramp that includes the specified time.
SDKs
- iOS 4.0+
- macOS 10.7+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 6.0+
Framework
- AVFoundation
Declaration
- (BOOL)getVolumeRampForTime:(CMTime)time startVolume:(float *)startVolume endVolume:(float *)endVolume timeRange:(CMTime Range *)timeRange;
Parameters
time
If a ramp with a time range that contains the specified time has been set, information about the effective ramp for that time is supplied. Otherwise, information about the first ramp that starts after the specified time is supplied.
startVolume
A pointer to a float to receive the starting volume value for the volume ramp.
This value may be
NULL
.endVolume
A pointer to a float to receive the ending volume value for the volume ramp.
This value may be
NULL
.timeRange
A pointer to a
CMTime
to receive the time range of the volume ramp.Range This value may be
NULL
.
Return Value
YES
if the values were retrieved successfully, otherwise NO
. Returns NO
if time
is beyond the duration of the last volume ramp that has been set.
Discussion
The process of setting up volume ramps requires the configuration of an instance of AVMutable
.