A controller for playback of a positional audio source in a SceneKit scene.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Scene
Kit
Declaration
@interface SCNAudioPlayer : NSObject
Overview
An SCNAudio
object controls playback of a positional audio source in a SceneKit scene. To use positional audio, first create a reusable SCNAudio
or AVAudio
object to provide an audio stream. Then, create an audio player to control the playback of that audio source. Finally, attach the audio player to an SCNNode
object for spatialized 3D audio playback based on the position of that node relative to the scene’s audio
node.