You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the current version of emsdk (3.1.53 although it seems not work in 3.1.52 as well) has an error when trying to import the SDL_mixer. I had a C program which used SDL2 and SDL_image which worked fine when compiled with emcc. However, when I add the flag -USE_SDL_MIXER=2, the code would break and the console would have the error: Mix_Init: no sound/music loaders supported () . Reverting to an older version of emsdk (I used 3.1.51 which is the most recent version that works) seemed to fix the issue.
The compile command that I had been using was:emcc source/main.c -o main.html -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s USE_SDL_MIXER=2 -sUSE_OGG=1 -s SDL2_IMAGE_FORMATS=["png"] -s ALLOW_MEMORY_GROWTH=1 --preload-file assets