From 75fb07a6d282ac0b3a9b51dd8cb48a6ef72b8b29 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 3 May 2017 18:05:29 -0300 Subject: [PATCH] iOS: Only mark interrupted audio devices as non-interrupted if AudioQueueStart is successful. --- src/audio/coreaudio/SDL_coreaudio.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/coreaudio/SDL_coreaudio.m b/src/audio/coreaudio/SDL_coreaudio.m index 485d86d16..32b9d9ba8 100644 --- a/src/audio/coreaudio/SDL_coreaudio.m +++ b/src/audio/coreaudio/SDL_coreaudio.m @@ -285,9 +285,9 @@ static void interruption_begin(_THIS) static void interruption_end(_THIS) { if (this != NULL && this->hidden != NULL && this->hidden->audioQueue != NULL - && this->hidden->interrupted) { + && this->hidden->interrupted + && AudioQueueStart(this->hidden->audioQueue, NULL) == AVAudioSessionErrorCodeNone) { this->hidden->interrupted = SDL_FALSE; - AudioQueueStart(this->hidden->audioQueue, NULL); } }