Instance Property

gain

The gain in decibels of the audio playback controller output.

Declaration

var gain: AudioPlaybackController.Decibel { get set }

Discussion

Use the fade(to:duration:) method to change the gain gradually and create smooth transitions.

See Also

Setting the Volume

func fade(to: AudioPlaybackController.Decibel, duration: TimeInterval)

Transitions the gain to the given value over a time interval using a linear curve.

typealias AudioPlaybackController.Decibel

A type for expressing gain in decibels.