pub unsafe extern "C-unwind" fn AudioQueuePrime(
in_aq: AudioQueueRef,
in_number_of_frames_to_prepare: u32,
out_number_of_frames_prepared: *mut u32,
) -> i32AudioQueue only.Expand description
Begins decoding buffers in preparation for playback.
This function begins decoding buffers in preparation for playback. It returns when at least the number of audio sample frames are decoded and ready to play or when all enqueued buffers have been completely decoded. To ensure that a buffer has been decoded and is completely ready for playback, before playback:
- Call AudioQueueEnqueueBuffer.
- Call AudioQueuePrime, which waits if you pass 0 to have a default number of frames decoded.
- Call AudioQueueStart.
Calls to AudioQueuePrime following AudioQueueStart/AudioQueuePrime, and before AudioQueueReset/AudioQueueStop, will have no useful effect. In this situation, outNumberOfFramesPrepared will not have a useful return value.
Parameter inAQ: The audio queue to be primed.
Parameter inNumberOfFramesToPrepare: The number of frames to decode before returning. Pass 0 to decode all enqueued buffers.
Parameter outNumberOfFramesPrepared: If not NULL, on return, a pointer to the number of frames actually decoded and prepared
for playback.
Returns: An OSStatus result code.
ยงSafety
in_aqmust be a valid pointer.out_number_of_frames_preparedmust be a valid pointer or null.