pub unsafe extern "C-unwind" fn AudioQueueEnqueueBuffer(
in_aq: AudioQueueRef,
in_buffer: AudioQueueBufferRef,
in_num_packet_descs: u32,
in_packet_descs: *const AudioStreamPacketDescription,
) -> i32AudioQueue and objc2-core-audio-types only.Expand description
Assigns a buffer to an audio queue for recording or playback.
If the buffer was allocated with AudioQueueAllocateBufferWithPacketDescriptions, the client should provide packet descriptions in the buffer’s mPacketDescriptions and mPacketDescriptionCount fields rather than in inPacketDescs and inNumPacketDescs, which should be NULL and 0, respectively, in this case.
For an input queue, pass 0 and NULL for inNumPacketDescs and inPacketDescs, respectively. Your callback will receive packet descriptions owned by the audio queue.
Parameter inAQ: The audio queue you are assigning the buffer to.
Parameter inBuffer: The buffer to queue (that is, to be recorded into or played from).
Parameter inNumPacketDescs: The number of packet descriptions pointed to by the inPacketDescs pointer. Applicable
only for output queues and required only for variable-bit-rate (VBR) audio formats. Pass
0 for input queues (no packet descriptions are required).
Parameter inPacketDescs: An array of packet descriptions. Applicable only for output queues and required only for
variable-bit-rate (VBR) audio formats. Pass NULL for input queues (no packet
descriptions are required).
Returns: An OSStatus result code.
§Safety
in_aqmust be a valid pointer.in_buffermust be a valid pointer.in_packet_descsmust be a valid pointer or null.