Browse Source

Emscripten: make CloseAudio actually close audio
cf. https://bugzilla.libsdl.org/show_bug.cgi?id=4176

Sylvain Beucler 6 years ago
parent
commit
1f6bd95110
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/audio/emscripten/SDL_emscriptenaudio.c

+ 1 - 0
src/audio/emscripten/SDL_emscriptenaudio.c

@@ -246,6 +246,7 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscaptu
     }
     }
     SDL_zerop(this->hidden);
     SDL_zerop(this->hidden);
 #endif
 #endif
+    this->hidden = (struct SDL_PrivateAudioData *)0x1;
 
 
     /* limit to native freq */
     /* limit to native freq */
     this->spec.freq = EM_ASM_INT_V({ return SDL2.audioContext.sampleRate; });
     this->spec.freq = EM_ASM_INT_V({ return SDL2.audioContext.sampleRate; });