From edfa5806ffc8a8fc05327ac709124a479514cab7 Mon Sep 17 00:00:00 2001 From: Charlie Birks Date: Tue, 30 Mar 2021 11:56:38 +0100 Subject: [PATCH] emscripten: Feed silence to device when paused --- src/audio/emscripten/SDL_emscriptenaudio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/audio/emscripten/SDL_emscriptenaudio.c b/src/audio/emscripten/SDL_emscriptenaudio.c index e4b2b0cc4..bc85b11a1 100644 --- a/src/audio/emscripten/SDL_emscriptenaudio.c +++ b/src/audio/emscripten/SDL_emscriptenaudio.c @@ -61,6 +61,9 @@ HandleAudioProcess(_THIS) if (this->stream) { SDL_AudioStreamClear(this->stream); } + + SDL_memset(this->work_buffer, this->spec.silence, this->spec.size); + FeedAudioDevice(this, this->work_buffer, this->spec.size); return; }