AudioQueueStop(_:_:)
Stops playing or recording audio.
Declaration
func AudioQueueStop(_ inAQ: AudioQueueRef, _ inImmediate: Bool) -> OSStatusParameters
- inAQ:
The audio queue to stop.
- inImmediate:
If you pass
true, stopping occurs immediately (that is, synchronously). If you passfalse, the function returns immediately, but the audio queue does not stop until its queued buffers are played or recorded (that is, the stop occurs asynchronously). Audio queue callbacks are invoked as necessary until the queue actually stops.
Return Value
A result code. See Result Codes.
Discussion
This function resets an audio queue, stops the audio hardware associated with the queue if it is not in use by other audio services, and stops the audio queue. When recording, this function is typically invoked by a user. When playing back, a playback audio queue callback should call this function when there is no more audio to play.