-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDL2_Mixer failed to initialize in MIDI format even has specified SDL2_MIXER_FORMATS=wav,mid #21008
Comments
I found this port tool has defined |
Also, I have mounted the GUS patches mentioned in this README at "/etc/timidity" emcc's CFLAGS:
|
I think the issue is related to PR (#16556) |
I've worked out the solution, which is that the following build flags need to be passed during the executable's linking phase so that the project can link the ported SDL_Mixer library. Originally, the build process of my project involved building many object files and then linking them together, however I missed to link the ported SDL_Mixer library. emcc build flags:
|
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.46 (1960782)
emcc CFLAGS
Error when SDL2_Mixer is initializing in MIDI format
Upon examining the SDL2_Mixer source code, I discovered that the primary cause might be that one of the following interfaces is not initialized in array
s_music_interfaces
(source):Therefore, the three MIDI music interfaces described above are not accessed when the
load_music_type
function is executed.I think defining one of the macros
MUSIC_MID_TIMIDITY
,MUSIC_MID_NATIVE
, orMUSIC_MID_FLUIDSYNTH
could be the solution. Since I can't find any documentation about any of them, may I know how to define one of them when building my own project (for example, defined them in emcc's CFLAGS)? Or perhaps there is another way to handle this?The text was updated successfully, but these errors were encountered: