<!--
{
  "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/SCNAction/playAudio(_:waitForCompletion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNAction(cm)playAudioSource:waitForCompletion:"
  },
  "title" : "playAudio(_:waitForCompletion:)"
}
-->

# playAudio(_:waitForCompletion:)

Creates an action that plays an audio source.

```
class func playAudio(_ source: SCNAudioSource, waitForCompletion wait: Bool) -> SCNAction
```

## Parameters

`source`

The audio source to play.

`wait`

If <doc://com.apple.documentation/documentation/Swift/true>, the duration of this action is the same as the length of the audio playback. If <doc://com.apple.documentation/documentation/Swift/false>, the action is considered to have completed immediately.

## Return Value

A new action object.

## Discussion

When the action executes, SceneKit plays the audio source on the target node—any positional audio effects are based on the node’s position. For more information about positional audio in SceneKit, see [`SCNAudioPlayer`](/documentation/SceneKit/SCNAudioPlayer).

This action is not reversible; the reverse of this action is the same action.

---

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)