Jelajahi Sumber

emscripten: add main thread proxy for getting audio frequency

the rest of the calls were updated in aec86ba but one was missed
Shane Calimlim 1 bulan lalu
induk
melakukan
a2e7c76bda
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/audio/emscripten/SDL_emscriptenaudio.c

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

@@ -270,7 +270,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(_THIS, const char *devname)
     this->hidden = (struct SDL_PrivateAudioData *)0x1;
 
     /* limit to native freq */
-    this->spec.freq = EM_ASM_INT({
+    this->spec.freq = MAIN_THREAD_EM_ASM_INT({
       var SDL2 = Module['SDL2'];
       return SDL2.audioContext.sampleRate;
     });