Instance Property

audioPlayers

The audio players currently attached to the node.

Declaration

@property(nonatomic, readonly) NSArray<SCNAudioPlayer *> *audioPlayers;

Discussion

Positional audio effects from a player attached to a node are based on that node’s position relative to the audioListener position in the scene.

After an audio player completes playback, SceneKit automatically removes it from the node. Therefore, this array always contains audio players that are currently playing back audio.

See Also

Working with Positional Audio

- addAudioPlayer:

Adds the specified auto player to the node and begins playback.

- removeAudioPlayer:

Removes the specified audio player from the node, stopping playback.

- removeAllAudioPlayers

Removes all audio players attached to the node, stopping playback.