As I understand Emscripten worker model, it does not support a shared state. However, I can share global variables between the SDL audio callback and my mainloop, which if I understand this correctly, shouldn't be possible. Does emscripten execute the audio callback on the main thread and therefore this is possible, or am I completely missunderstanding the worker concept and global variable sharing?
(My assumption was the audio-callback is executed in a worker).
Note: I'm referring to emscripten compiled without pthreads support.