---
title: "addAudioPlayer(_:)"
framework: scenekit
role: symbol
role_heading: Instance Method
path: "scenekit/scnnode/addaudioplayer(_:)"
---

# addAudioPlayer(_:)

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

## Declaration

```swift
func addAudioPlayer(_ player: SCNAudioPlayer)
```

## Parameters

- `player`: An audio player object.

## Discussion

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](scenekit/scnnode/audioplayers.md)
- [removeAudioPlayer(_:)](scenekit/scnnode/removeaudioplayer(_:).md)
- [removeAllAudioPlayers()](scenekit/scnnode/removeallaudioplayers().md)
