<!--
{
  "documentType" : "article",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/using-audio-nodes-with-the-scene-s-listener",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Using Audio Nodes with the Scene’s Listener"
}
-->

# Using Audio Nodes with the Scene’s Listener

Add audio to your scene, and optionally give it 2D-positional mixing characteristics.

## Discussion

The simplest way to add audio to a SpriteKit scene is to add a child [`SKAudioNode`](/documentation/SpriteKit/SKAudioNode) to it:

```swift
let audio = SKAudioNode(fileNamed: "drums.mp3")

spriteKitViewController.scene.addChild(audio)
```

However, if you define the presented scene’s [`listener`](/documentation/SpriteKit/SKScene/listener), its audio nodes are played back with positional sound mixing. For example, if you set the scene’s `listener` to be the scene’s `camera` and then add audio nodes as children to various parent nodes in the scene, the further away the parent nodes are from the center of the screen, the quieter their audio will be played.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)