emscriptenaudio: don't get stuck in infinite loop if SDL_AudioStreamPut fails.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 06 Jan 2017 00:49:35 -0500
changeset 107616afae547c925
parent 10760 0333e86613d5
child 10762 4b1b1918a246
emscriptenaudio: don't get stuck in infinite loop if SDL_AudioStreamPut fails.
src/audio/emscripten/SDL_emscriptenaudio.c
     1.1 --- a/src/audio/emscripten/SDL_emscriptenaudio.c	Thu Jan 05 21:31:02 2017 -0500
     1.2 +++ b/src/audio/emscripten/SDL_emscriptenaudio.c	Fri Jan 06 00:49:35 2017 -0500
     1.3 @@ -73,6 +73,7 @@
     1.4              if (SDL_AudioStreamPut(this->stream, this->fake_stream, stream_len) == -1) {
     1.5                  SDL_AudioStreamClear(this->stream);
     1.6                  SDL_AtomicSet(&this->enabled, 0);
     1.7 +                break;
     1.8              }
     1.9          }
    1.10