<!--
{
  "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/AudioQueueNewInput(_:_:_:_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@AudioQueueNewInput"
  },
  "title" : "AudioQueueNewInput(_:_:_:_:_:_:_:)"
}
-->

# AudioQueueNewInput(_:_:_:_:_:_:_:)

Creates a new recording audio queue object.

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

## Parameters

`inFormat`

The compressed or uncompressed audio data format to record to. When recording to linear PCM, only interleaved formats are supported.

`inCallbackProc`

A callback function to use with the recording audio queue. The audio queue calls this function when the audio queue has finished filling a buffer. See [`AudioQueueInputCallback`](/documentation/AudioToolbox/AudioQueueInputCallback).

`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 called 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 recording audio queue.

## Return Value

A result code. See Result Codes.

## See Also

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

Sets the rendering mode and audio format for 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)