Creates an action that changes an audio node’s occlusion to a new value.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Sprite
Kit
Declaration
class func changeOcclusion(to v: Float, duration: Time Interval) -> SKAction
Parameters
v
The new value for the occlusion, 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. Passing this action a value of -100 yields the greatest reduction in volume. For more information, see AVAudio3DMixing
.
This action is not reversible.