Instance Method

addAudioPlayer:

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

Declaration

- (void)addAudioPlayer:(SCNAudioPlayer *)player;

Parameters

player

An audio player object.

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 playback has completed, SceneKit automatically removes the audio player from the node.

See Also

Working with Positional Audio

audioPlayers

The audio players currently attached to the node.

- removeAudioPlayer:

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

- removeAllAudioPlayers

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