pub unsafe extern "C-unwind" fn CMAudioSampleBufferCreateWithPacketDescriptions(
allocator: Option<&CFAllocator>,
data_buffer: Option<&CMBlockBuffer>,
data_ready: bool,
make_data_ready_callback: CMSampleBufferMakeDataReadyCallback,
make_data_ready_refcon: *mut c_void,
format_description: &CMFormatDescription,
num_samples: CMItemCount,
presentation_time_stamp: CMTime,
packet_descriptions: *const AudioStreamPacketDescription,
sample_buffer_out: NonNull<*mut CMSampleBuffer>,
) -> i32Available on crate features
CMBase and CMBlockBuffer and CMFormatDescription and CMSampleBuffer and CMTime and objc2-core-audio-types only.Expand description
Creates an CMSampleBuffer containing audio given packetDescriptions instead of sizing and timing info
Provides an optimization over CMSampleBufferCreate() when the caller already has packetDescriptions for the audio data. This routine will use the packetDescriptions to create the sizing and timing arrays required to make the sample buffer if necessary.
ยงSafety
make_data_ready_callbackmust be implemented correctly.make_data_ready_refconmust be a valid pointer or null.packet_descriptionsmust be a valid pointer or null.sample_buffer_outmust be a valid pointer.