Closed Nrezinorn closed 3 years ago
I am not sure if this is a library/linker issue, but I am not able to load MIDI files with Mix_LoadMus() on Windows 10.
$ pacman -Q |grep mixer mingw-w64-x86_64-SDL2_mixer 2.0.4-3 .\MusTest.exe Mix_LoadMUS("flourish.mid"): Unrecognized audio format
$ pacman -Q |grep mixer mingw-w64-x86_64-SDL2_mixer 2.0.4-3
.\MusTest.exe Mix_LoadMUS("flourish.mid"): Unrecognized audio format
#include <SDL2/SDL.h> #include <SDL2/SDL_mixer.h> #include <iostream> int main(int argc, char *args[]){ SDL_Init(SDL_INIT_AUDIO); Mix_Init(MIX_INIT_MID); Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, 16, 0); Mix_Music* foo; foo = Mix_LoadMUS("flourish.mid"); if(!foo) { printf("Mix_LoadMUS(\"flourish.mid\"): %s\n", Mix_GetError()); } Mix_PlayMusic(foo,-1); SDL_Delay(10000); Mix_FreeMusic(foo); Mix_Quit(); SDL_Quit(); return 0;
Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 0);
fixes. Closing
I am not sure if this is a library/linker issue, but I am not able to load MIDI files with Mix_LoadMus() on Windows 10.