Contents

changeOcclusion(by:duration:)

Creates an action that changes an audio node’s occlusion by a relative value.

Declaration

class func changeOcclusion(by v: Float, duration: TimeInterval) -> SKAction

Parameters

  • v:

    The amount to change the occlusion by, in decibels.

  • duration:

    The duration of the animation, in seconds.

Return Value

A new action object.

Discussion

When the action executes, the audio node’s occlusion 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