AudioQueueAllocateBufferWithPacketDescriptions

Function AudioQueueAllocateBufferWithPacketDescriptions 

Source
pub unsafe extern "C-unwind" fn AudioQueueAllocateBufferWithPacketDescriptions(
    in_aq: AudioQueueRef,
    in_buffer_byte_size: u32,
    in_number_packet_descriptions: u32,
    out_buffer: NonNull<AudioQueueBufferRef>,
) -> i32
Available on crate features AudioQueue and objc2-core-audio-types only.
Expand description

Asks an audio queue to allocate a buffer with space for packet descriptions.

Once allocated, the pointer to the buffer and the buffer’s size are fixed and cannot be changed. The mAudioDataByteSize field in the audio queue buffer structure, AudioQueueBuffer, is initially set to 0.

Parameter inAQ: The audio queue you want to allocate a buffer.

Parameter inBufferByteSize: The desired size of the new buffer, in bytes. An appropriate buffer size depends on the processing you will perform on the data as well as on the audio data format.

Parameter inNumberPacketDescriptions: The desired capacity of the packet description array in the new buffer.

Parameter outBuffer: On return, points to the newly created audio buffer. The mAudioDataByteSize field in the audio queue buffer structure, AudioQueueBuffer, is initially set to 0.

Returns: An OSStatus result code.

§Safety

  • in_aq must be a valid pointer.
  • out_buffer must be a valid pointer.