emscriptenaudio: don't get stuck in infinite loop if SDL_AudioStreamPut fails.

This commit is contained in:
Ryan C. Gordon 2017-01-06 00:49:35 -05:00
parent f07a1a5ad5
commit 1a90c72dfc
1 changed files with 1 additions and 0 deletions

View File

@ -73,6 +73,7 @@ HandleAudioProcess(_THIS)
if (SDL_AudioStreamPut(this->stream, this->fake_stream, stream_len) == -1) { if (SDL_AudioStreamPut(this->stream, this->fake_stream, stream_len) == -1) {
SDL_AudioStreamClear(this->stream); SDL_AudioStreamClear(this->stream);
SDL_AtomicSet(&this->enabled, 0); SDL_AtomicSet(&this->enabled, 0);
break;
} }
} }