Returns an audio player (creating one if necessary) to play an audio node.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
An audio node object.
A positional audio player object.
Creating an audio player from an audio node does not attach that node to an
AVAudio object for mixing and playback—instead, this option allows you to build your own audio node graph for custom effects before manually adding it to the
audio object of the view (or other SceneKit renderer) displaying the scene. Then, after you attach the audio player to an
SCNNode object, SceneKit continually updates the audio node’s 3D mixing parameters to match the position of the scene node.
When you use this method, SceneKit creates an audio player for the specified
AVAudio object or, if an audio player for that node already exists and is not in use, SceneKit reuses the existing player object.