stereoPan(to:duration:)
Creates an action that changes an audio node’s stereo panning to a new value.
Declaration
class func stereoPan(to v: Float, duration: TimeInterval) -> SKActionParameters
- v:
The new value for stereo panning. The value must between
-1.0(left channel only) and1.0(right channel only), inclusive. - duration:
The duration of the animation, in seconds.
Return Value
A new action object.
Discussion
When the action executes, the audio node’s stereo panning animates from its current value to its new value. For more information, see AVAudio3DMixing.
This action is not reversible.
See Also
Controlling the Audio of a Node
playSoundFileNamed(_:waitForCompletion:)play()pause()stop()changePlaybackRate(to:duration:)changePlaybackRate(by: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(by:duration:)