From 1f6bd95110ac7ae59340fe423c6a7aa5926cf6d6 Mon Sep 17 00:00:00 2001 From: Sylvain Beucler Date: Thu, 15 Nov 2018 18:22:30 +0000 Subject: [PATCH] Emscripten: make CloseAudio actually close audio cf. https://bugzilla.libsdl.org/show_bug.cgi?id=4176 --- src/audio/emscripten/SDL_emscriptenaudio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/audio/emscripten/SDL_emscriptenaudio.c b/src/audio/emscripten/SDL_emscriptenaudio.c index e519f0834..30d200dce 100644 --- a/src/audio/emscripten/SDL_emscriptenaudio.c +++ b/src/audio/emscripten/SDL_emscriptenaudio.c @@ -246,6 +246,7 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscaptu } SDL_zerop(this->hidden); #endif + this->hidden = (struct SDL_PrivateAudioData *)0x1; /* limit to native freq */ this->spec.freq = EM_ASM_INT_V({ return SDL2.audioContext.sampleRate; });