mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-03 07:29:37 +01:00
fa15674134
The audioqueue thread needs to keep running, and processing the CFRunLoop until the AudioQueue is disposed of, otherwise CoreAudio will hang waiting for final data to feed the device. At least, I think this is how it all works. It definitely fixes the bug here! Since AudioQueueDispose() calls AudioQueueStop() internally, there's no need for our thread to handle this, either, which is good because the AudioQueue would be disposed by this point. So now the AudioQueue is disposed first, and then our thread is joined, and everything works out okay. Just in case, we mark the device "paused" before setting everything in motion, so any further callbacks from CoreAudio will write silence and not fire the app's audio callback again. Fixes Bugzilla #3868. |
||
---|---|---|
.. | ||
SDL_coreaudio.h | ||
SDL_coreaudio.m |