For my variant, I added mp3 support following this github commit: 2a6cd14f8cab95017071a8e607f5c5089838dd5b. When this perfectly works with the Win client, I have really big problems making it work with the SDL client under Windows.
Currently for my variant, I compile the SDL client using SDL 1.2.14 and SDL Mixer 1.2.11 with dynamically linked sound support.
First problem: "Failed to load smpeg.dll" when trying to play a sound
This is the dll that is dynamically linked in SDL mixer for mp3 support. I go to \SDL_mixer-1.2.11\VisualC.zip\VisualC\smpeg\lib, find the dll and put it next to SDL_mixer.dll
Second problem: "DLL entry point for SDL_CloseAudio cannot be found in SDL.dll"
The compiled dll is not compatible with the version of SDL mixer I have compiled... and I need to compile it myself. So I open google, search for smpeg project and find links to smpeg 0.4.4... all leading to 404 errors (dead links). I go to the SDL Mixer project... and find that the new version (SDL Mixer 1.2.12) comes with a packaged version of the current source code of smpeg (0.4.5). So I download both smpeg 0.4.5 and SDL Mixer 1.2.12 source code and compile them.
Third problem: "Failed loading SMPEG_actualSpec: the specified procedure cannot be found"
To fix this, I have to link smpeg statically instead of dynamically in SDL Mixer.
Fourth problem: SDL client doesn't start anymore
I have a weird bug when initializing SDL sound in sound_sdl_init() after calling Mix_LoadMUS() to load the mp3 files in memory. This problem doesn't happen with SDL Mixer 1.2.11, so I roll back to that version.
Fifth and final problem: mp3 files are not played by play_sound()
Calling Mix_PlayMusic() the first time to play a mp3 sound does nothing, calling it a second time to play another sound simply results in an endless loop in the SDL Mixer code (precisely when calling SDL_LockAudio in Mix_FadeInMusicPos).
I am now out of ideas on how to fix that... Is it a bug in smpeg? in SDL Mixer? a problem with Windows compatibility (smpeg is originally designed for linux)?
Currently for my variant, I compile the SDL client using SDL 1.2.14 and SDL Mixer 1.2.11 with dynamically linked sound support.
First problem: "Failed to load smpeg.dll" when trying to play a sound
This is the dll that is dynamically linked in SDL mixer for mp3 support. I go to \SDL_mixer-1.2.11\VisualC.zip\VisualC\smpeg\lib, find the dll and put it next to SDL_mixer.dll
Second problem: "DLL entry point for SDL_CloseAudio cannot be found in SDL.dll"
The compiled dll is not compatible with the version of SDL mixer I have compiled... and I need to compile it myself. So I open google, search for smpeg project and find links to smpeg 0.4.4... all leading to 404 errors (dead links). I go to the SDL Mixer project... and find that the new version (SDL Mixer 1.2.12) comes with a packaged version of the current source code of smpeg (0.4.5). So I download both smpeg 0.4.5 and SDL Mixer 1.2.12 source code and compile them.
Third problem: "Failed loading SMPEG_actualSpec: the specified procedure cannot be found"
To fix this, I have to link smpeg statically instead of dynamically in SDL Mixer.
Fourth problem: SDL client doesn't start anymore
I have a weird bug when initializing SDL sound in sound_sdl_init() after calling Mix_LoadMUS() to load the mp3 files in memory. This problem doesn't happen with SDL Mixer 1.2.11, so I roll back to that version.
Fifth and final problem: mp3 files are not played by play_sound()
Calling Mix_PlayMusic() the first time to play a mp3 sound does nothing, calling it a second time to play another sound simply results in an endless loop in the SDL Mixer code (precisely when calling SDL_LockAudio in Mix_FadeInMusicPos).
I am now out of ideas on how to fix that... Is it a bug in smpeg? in SDL Mixer? a problem with Windows compatibility (smpeg is originally designed for linux)?
Comment