The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
June 19, 2024, 05:53:43 am
Home Help Search Login Register
News: Celebrating 30 years of Star Control 2 - The Ur-Quan Masters

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Patch for Music
« previous next »
Pages: [1] Print
Author Topic: Patch for Music  (Read 1825 times)

Patch for Music
« on: December 17, 2002, 03:45:45 am »

I've noticed that MikMod, the library used to play the .MOD files in the game, is currently setup to ignore loop commands in the songs, leading to strange artifacts such as hearing the "end" of the Pkunk theme in-game, or the "beginning" of the Melnorme theme more than once.

It's a simple fix to get looping switched on, and thusly in conformance with the original PC version (I don't know if the 3DO version behaved the same way, but I'll presume it did)  Feel free to stuff it into CVS if you deem it worthy:

Index: src/sc2code/libs/sound/openal/decoders/decoder.c
RCS file: /cvsroot/sc2/sc2/src/sc2code/libs/sound/openal/decoders/decoder.c,v
retrieving revision 1.8
diff -u -r1.8 decoder.c
--- src/sc2code/libs/sound/openal/decoders/decoder.c    7 Dec 2002 20:06:39 -0000       1.8
+++ src/sc2code/libs/sound/openal/decoders/decoder.c    16 Dec 2002 23:33:11 -0000
@@ -171,7 +171,7 @@
               mod->extspd = 1;
               mod->panflag = 1;
               mod->wrap = 0;
-               mod->loop = 0;
+               mod->loop = 1;

               decoder = (TFB_SoundDecoder *) HMalloc (sizeof (TFB_SoundDecoder));
               decoder->buffer = HMalloc (buffer_size);

  • Looping could be turned off for a reason.  For all I know, MikMod leaks memory like a sieve when looping is enabled, or something else equally dastardly; but in my cursory testing it appeared to work wonderfully.

  • I only have Linux to test on (no VC++ for me) so I have no idea if this breaks the win32 version into a zillion pieces or not.  I warmly invite anyone with win32 build capability to try this out and report the results.
Pages: [1] Print 
« previous next »
Jump to:  

Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!