You can use an action as previously answered, as it is syntactically easier to use.
SCNAudioPlayers are recycled by the engine, so you donβt need to worry about their lifespan unless you need to change them during the game. The idea behind the SceneKit sound engine is that sounds should behave just like SCNNodes. If there is a node on the scene graph, then it is visible, as well as its geometry, particle systems, etc. Therefore, if a sound is attached to a node, it should start playback immediately if the node is visible (see and stop if it is hidden).
The audio source represents only the actual audio data. Think of it as a texture: it loads once and can refer to a number of materials on a number of three-dimensional nodes. The audio player creates a sound source so that you can play it on multiple nodes at the same time, just like you would use the same material for different geometries on different nodes.
We hope that this helps and gives some perspective on the choice of design,
S.
source share