[Commits] SDL: iOS: Only mark interrupted audio devices as non-interrupted...

libsdl.org revision control commits-owner at libsdl.org
Wed May 3 14:11:17 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/22a0b777d7cd
changeset: 10987:22a0b777d7cd
user:      Alex Szpakowski <slime73 at gmail.com>
date:      Wed May 03 18:05:29 2017 -0300
description:
iOS: Only mark interrupted audio devices as non-interrupted if AudioQueueStart is successful.

diffstat:

 src/audio/coreaudio/SDL_coreaudio.m |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (15 lines):

diff -r b93491afe676 -r 22a0b777d7cd src/audio/coreaudio/SDL_coreaudio.m
--- a/src/audio/coreaudio/SDL_coreaudio.m	Tue May 02 21:46:28 2017 -0400
+++ b/src/audio/coreaudio/SDL_coreaudio.m	Wed May 03 18:05:29 2017 -0300
@@ -285,9 +285,9 @@
 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);
     }
 }
 


More information about the commits mailing list