mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 10:55:33 +00:00
coreaudio: Flush/stop the AudioQueue before disposing of it.
Otherwise, a CoreAudio thread lingers forever, and coreaudiod eats CPU until the SDL process terminates. Fixes #7689.
This commit is contained in:
parent
de93728674
commit
86786ed544
|
@ -692,6 +692,8 @@ static void COREAUDIO_CloseDevice(_THIS)
|
|||
|
||||
/* dispose of the audio queue before waiting on the thread, or it might stall for a long time! */
|
||||
if (this->hidden->audioQueue) {
|
||||
AudioQueueFlush(this->hidden->audioQueue);
|
||||
AudioQueueStop(this->hidden->audioQueue, 0);
|
||||
AudioQueueDispose(this->hidden->audioQueue, 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue