Go Back   Angband Forums > Angband > Development

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old June 4, 2012, 10:56   #1
PowerWyrm's Avatar
Join Date: Apr 2008
Posts: 2,972
PowerWyrm is on a distinguished road
Help! New MP3 support not working with SDL client under Windows

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\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)?
PWMAngband variant maintainer - check (or to learn more about this new variant!
PowerWyrm is offline   Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Display glitch with GCU client? PowerWyrm Development 13 October 15, 2012 20:58
A little bugfix for Windows users not using Win client... PowerWyrm Development 0 May 25, 2012 15:33
[3.3.x] SDL client: unable to perform some commands PowerWyrm Vanilla 2 November 1, 2011 16:58
Windows PNG support in staging d_m Development 9 June 1, 2011 04:51
2 options for Windows PNG support Blue Baron Development 36 June 1, 2011 00:14

All times are GMT +1. The time now is 20:53.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.