niklata Posted December 27, 2012 Report Share Posted December 27, 2012 (edited) MP3 playback has never worked for me with UFO Extender, so I went and fixed it when I found that source is available. UFO Extender uses the deprecated MCI API, which doesn't seem to work and instead crashes on modern windows (missing codecs?). Attached is a modified version of UFO Extender 1.28.3 patcher.dll that will use BASS (http://www.un4seen.com) for MP3 decoding. BASS allows non-commercial use, so it should be fine for this application. Just extract it in place of your existing patcher.dll (and put bass.dll in the same directory). If you are not a developer, you may delete music.cpp.diff. Please note that the patcher.dll has been built with VS2012 (and thus requires the VS2012 redistributable package to be installed) and may not work on WinXP and earlier. I did use the WinXP compatibility toolchain, but I cannot test to confirm that it works. Building with an earlier compiler version will fix any issue that may exist. For devs: I've included a diff of the changes I've made to music.cpp. Building is simple and only requires that those changes be applied and that bass.lib and bass.h (from the distribution) be extracted to patcher/. Change from v1: Loop playback of a file. UFOExtenderMP3Fix-v2.zip Edited December 27, 2012 by niklata Link to comment Share on other sites More sharing options...
Tycho525 Posted December 30, 2012 Report Share Posted December 30, 2012 (edited) nice work! I'm the person who's been updating Seb's loader after his absence. If you don't mind, I'll see about adding this into the next offical release of the Extender (with all credit due to you, of course!). update: the file you released won't play on my system. I'm using XP and VS 2008. I think it is a version conflict. However, I imported your changes to the music.cpp file and recompiled and it plays fine. Edited December 30, 2012 by Tycho525 Link to comment Share on other sites More sharing options...
niklata Posted December 31, 2012 Author Report Share Posted December 31, 2012 I'd be very happy to see my patch integrated into UFO Extender. Thank you for your work on maintaining and improving this excellent program. Thanks for letting me know that the executable I built doesn't work on XP. I'll have to set up a VM with XP sometime and hunt down the problem. Link to comment Share on other sites More sharing options...
Tycho525 Posted January 1, 2013 Report Share Posted January 1, 2013 nothing is wrong with your code. It was a problem of dll incompatibility since I am using VS2008. Link to comment Share on other sites More sharing options...
Tycho525 Posted February 16, 2013 Report Share Posted February 16, 2013 Do you think you could get base.dll to handle sound files as well as music? I know the sound routines pretty well and could provide you with the offsets where the sound routine passes the data to the MCI layer. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now