pub unsafe extern "C-unwind" fn AudioQueueStop(
in_aq: AudioQueueRef,
in_immediate: bool,
) -> i32AudioQueue only.Expand description
Stops playing or recording audio.
This function resets the audio queue and stops the audio hardware associated with the queue if it is not in use by other audio services. Synchronous stops occur immediately, regardless of previously buffered audio data. Asynchronous stops occur after all queued buffers have been played or recorded.
Parameter inAQ: The audio queue to stop.
Parameter inImmediate: If you pass true, the stop request occurs immediately (that is, synchronously), and the
function returns when the audio queue has stopped. Buffer callbacks are invoked during
the stopping. If you pass false, the function returns immediately, but the queue does
not stop until all its queued buffers are played or filled (that is, the stop occurs
asynchronously). Buffer callbacks are invoked as necessary until the queue actually
stops. Also, a playback audio queue callback calls this function when there is no more
audio to play.
Note that when stopping immediately, all pending buffer callbacks are normally invoked during the process of stopping. But if the calling thread is responding to a buffer callback, then it is possible for additional buffer callbacks to occur after AudioQueueStop returns.
Returns: An OSStatus result code.
ยงSafety
in_aq must be a valid pointer.