changePlaybackRate(by:duration:)
Creates an action that changes an audio node’s playback rate by a relative amount.
Declaration
class func changePlaybackRate(by v: Float, duration: TimeInterval) -> SKActionParameters
- v:
The amount to change the playback rate by. A playback rate of
1.0represents normal speed. - duration:
The duration of the animation, in seconds.
Return Value
A new action object.
Discussion
When the action executes, the audio node’s playback rate animates from its current value to its new value. For more information, see AVAudio3DMixing.
This action is reversible; the reverse is created as if the following code is executed:
See Also
Controlling the Audio of a Node
playSoundFileNamed(_:waitForCompletion:)play()pause()stop()changePlaybackRate(to:duration:)changeVolume(to:duration:)changeVolume(by:duration:)changeObstruction(to:duration:)changeObstruction(by:duration:)changeOcclusion(to:duration:)changeOcclusion(by:duration:)changeReverb(to:duration:)changeReverb(by:duration:)stereoPan(to:duration:)stereoPan(by:duration:)