I am making an audio streaming application. When I try to dispose the AudioQueue object, I get the exception shown on the screenshot.
I use
AudioQueueDispose(queue,true)
If I change true to false, exception is still thrown but a bit later. If I use AudioQueueStop or any other stopping, resetting functions, I do not get this exception.
(With the help of a isStopping flag, I return from buffer callback function without touching to buffers if it is being stopped.)
Here is the screenshot:
I do not understand the problem, what am I missing here?