Contents

changeObstruction(to:duration:)

Creates an action that changes an audio node’s obstruction to a new value.

Declaration

class func changeObstruction(to v: Float, duration: TimeInterval) -> SKAction

Parameters

  • v:

    The new value for the obstruction, 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 obstruction animates from its current value to its new value. Passing this action a value of -100 yields the greatest reduction in volume. For more information, see AVAudio3DMixing.

This action is not reversible.

See Also

Controlling the Audio of a Node