From 55a4166fcfa8dc60ba3bd443ba1d838447dde58e Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 19 Nov 2005 18:30:17 +0000 Subject: [PATCH] To: sdl@libsdl.org From: Rainer Deyke Date: Mon, 12 Sep 2005 19:33:58 -0600 Subject: [SDL] SDL_mixer inconsistency When a module music file is loaded through Mix_LoadMUS, several of its flags (e.g. implicit looping) are set in a certain way by SDL_mixer (line 592, music.c, CVS). However, when the same music file is loaded through Mix_LoadMUS_RW, its flags are unaffected (line 1398, music.c, CVS). --- music.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/music.c b/music.c index 4604bbbf..4469e9cf 100644 --- a/music.c +++ b/music.c @@ -1385,6 +1385,16 @@ Mix_Music *Mix_LoadMUS_RW(SDL_RWops *rw) { if (music->data.module==NULL) { Mix_SetError("%s",MikMod_strerror(MikMod_errno)); music->error=1; + } else { + /* Stop implicit looping, fade out and other flags. */ + music->data.module->extspd = 1; + music->data.module->panflag = 1; + music->data.module->wrap = 0; + music->data.module->loop = 0; +#if 0 /* Don't set fade out by default - unfortunately there's no real way + to query the status of the song or set trigger actions. Hum. */ + music->data.module->fadeout = 1; +#endif } } else #endif