pub unsafe extern "C-unwind" fn CMAudioSampleBufferCreateReadyWithPacketDescriptions(
allocator: Option<&CFAllocator>,
data_buffer: &CMBlockBuffer,
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. CMAudioSampleBufferCreateReadyWithPacketDescriptions is identical to CMAudioSampleBufferCreateWithPacketDescriptions except that dataReady is always true, and so no makeDataReadyCallback or refcon needs to be passed.
ยงSafety
packet_descriptionsmust be a valid pointer or null.sample_buffer_outmust be a valid pointer.