pub unsafe extern "C-unwind" fn AudioQueueNewOutputWithDispatchQueue(
out_aq: NonNull<AudioQueueRef>,
in_format: NonNull<AudioStreamBasicDescription>,
in_flags: u32,
in_callback_dispatch_queue: &DispatchQueue,
in_callback_block: AudioQueueOutputCallbackBlock,
) -> i32AudioQueue and block2 and dispatch2 and objc2-core-audio-types only.Expand description
Creates a new audio queue for playing audio data.
To create an playback audio queue, you allocate buffers, then queue buffers (using AudioQueueEnqueueBuffer). The callback receives buffers and typically queues them again. To schedule a buffer for playback, providing parameter and start time information, call AudioQueueEnqueueBufferWithParameters.
Parameter outAQ: On return, this variable contains a pointer to the newly created playback audio queue
object.
Parameter inFormat: A pointer to a structure describing the format of the audio data to be played. For
linear PCM, only interleaved formats are supported. Compressed formats are supported.
Parameter inFlags: Reserved for future use. Pass 0.
Parameter inCallbackDispatchQueue: The dispatch queue from which inCallbackBlock is to be called.
Parameter inCallbackBlock: A pointer to a callback block to be called when the audio queue has finished playing
a buffer.
Returns: An OSStatus result code.
ยงSafety
out_aqmust be a valid pointer.in_formatmust be a valid pointer.in_callback_dispatch_queuepossibly has additional threading requirements.in_callback_blockmust be a valid pointer.