Function

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

Creates a new recording audio queue object.

Declaration

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.

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 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.