'Can an AudioQueue's buffers be flushed
I'm trying to implement a "seek" function where the user can move the playback position on a slider and have my player start playing from the new position. The problem I'm encountering is that the AudioQueue still has buffers in its queue and will keep playing them. I haven't figured out any way to tell the queue to disregard the remaining queued buffers and start playing from a new buffer I pass in. I have tried pausing (AudioQueuePause) the queue and flushing the buffers (AudioQueueFlush) but that doesn't do what I expected. Do I need to toss the old audio queue and start fresh?
Solution 1:[1]
You need to restart the audio queue.
You can do this by call AudioQueueStop(audioQueue, true) and then AudioQueueStart().
The flag in AudioQueueStop() means "stop synchronously".
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rhythmic Fistman |
