<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/AudioQueueNewOutput(_:_:_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@AudioQueueNewOutput"
  },
  "title" : "AudioQueueNewOutput(_:_:_:_:_:_:_:)"
}
-->

# AudioQueueNewOutput(_:_:_:_:_:_:_:)

Creates a new playback audio queue object.

```
func AudioQueueNewOutput(_ inFormat: UnsafePointer<AudioStreamBasicDescription>, _ inCallbackProc: AudioQueueOutputCallback, _ inUserData: UnsafeMutableRawPointer?, _ inCallbackRunLoop: CFRunLoop?, _ inCallbackRunLoopMode: CFString?, _ inFlags: UInt32, _ outAQ: UnsafeMutablePointer<AudioQueueRef?>) -> OSStatus
```

## Parameters

`inFormat`

The data format of the audio to play. For linear PCM, only interleaved formats are supported. Compressed formats are also supported.

`inCallbackProc`

A callback function to use with the playback audio queue. The audio queue invokes the callback when the audio queue has finished acquiring a buffer. See [`AudioQueueOutputCallback`](/documentation/AudioToolbox/AudioQueueOutputCallback).

`inUserData`

A custom data structure for use with the callback function.

`inCallbackRunLoop`

The event loop on which the callback function pointed to by the `inCallbackProc` parameter is to be called. If you specify `NULL`, the callback is invoked on one of the audio queue’s internal threads.

`inCallbackRunLoopMode`

The run loop mode in which to invoke the callback function specified in the `inCallbackProc` parameter. Typically, you pass `kCFRunLoopCommonModes` or use `NULL`, which is equivalent. You can choose to create your own thread with your own run loops. For more information on run loops, see Run Loops and <doc://com.apple.documentation/documentation/CoreFoundation/CFRunLoop>.

`inFlags`

Reserved for future use. Must be `0`.

`outAQ`

On output, the newly created playback audio queue object.

## Return Value

A result code. See Result Codes.

## See Also

[`AudioQueueOfflineRender(_:_:_:_:)`](/documentation/AudioToolbox/AudioQueueOfflineRender(_:_:_:_:))

Exports audio to a buffer, instead of to a device, using a playback audio queue.



---

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)