<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNAudioPlayer/audioPlayerWithAVAudioNode:",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNAudioPlayer(cm)audioPlayerWithAVAudioNode:"
  },
  "title" : "audioPlayerWithAVAudioNode:"
}
-->

# audioPlayerWithAVAudioNode:

Returns an audio player (creating one if necessary) to play an audio node.

```
+ (instancetype) audioPlayerWithAVAudioNode:(AVAudioNode *) audioNode;
```

## Parameters

`audioNode`

An audio node object.

## Return Value

A positional audio player object.

## Discussion

Creating an audio player from an audio node does not attach that node to an <doc://com.apple.documentation/documentation/AVFAudio/AVAudioEngine> object for mixing and playback—instead, this option allows you to build your own audio node graph for custom effects before manually adding it to the [`audioEngine`](/documentation/SceneKit/SCNSceneRenderer/audioEngine) object of the view (or other SceneKit renderer) displaying the scene. Then, after you attach the audio player to an [`SCNNode`](/documentation/SceneKit/SCNNode) object, SceneKit continually updates the audio node’s 3D mixing parameters to match the position of the scene node.

When you use this method, SceneKit creates an audio player for the specified <doc://com.apple.documentation/documentation/AVFAudio/AVAudioNode> object or, if an audio player for that node already exists and is not in use, SceneKit reuses the existing player object.

---

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)