Jump to content


Photo

UFO Extender 1.28.3 MP3 Fix


4 replies to this topic

#1 niklata

niklata

    Rookie

  • Forum Members
  • Pip
  • 0 posts

Posted 26 December 2012 - 06:12 PM

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.

Attached File  UFOExtenderMP3Fix-v2.zip   158.66K   117 downloads

Edited by niklata, 26 December 2012 - 06:50 PM.


#2 Tycho525

Tycho525

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 29 December 2012 - 08:05 PM

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 by Tycho525, 29 December 2012 - 09:26 PM.

"If you had any balls, you'd say "Oh, my God, what is that thing?" then scream and cut your mike. "
---Michael Collins [discussing what Armstrong will say when he steps onto the surface of the moon] "From the Earth to the Moon"

My UFOpaedia page with links to all TFTDextender information: http://www.ufopaedia...=User:Morgan525.

#3 niklata

niklata

    Rookie

  • Forum Members
  • Pip
  • 0 posts

Posted 30 December 2012 - 10:44 PM

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.

#4 Tycho525

Tycho525

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 31 December 2012 - 11:04 PM

nothing is wrong with your code. It was a problem of dll incompatibility since I am using VS2008.
"If you had any balls, you'd say "Oh, my God, what is that thing?" then scream and cut your mike. "
---Michael Collins [discussing what Armstrong will say when he steps onto the surface of the moon] "From the Earth to the Moon"

My UFOpaedia page with links to all TFTDextender information: http://www.ufopaedia...=User:Morgan525.

#5 Tycho525

Tycho525

    Squaddie

  • Forum Members
  • PipPip
  • 6 posts

Posted 15 February 2013 - 11:19 PM

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.


"If you had any balls, you'd say "Oh, my God, what is that thing?" then scream and cut your mike. "
---Michael Collins [discussing what Armstrong will say when he steps onto the surface of the moon] "From the Earth to the Moon"

My UFOpaedia page with links to all TFTDextender information: http://www.ufopaedia...=User:Morgan525.



Reply to this topic