To: sdl@libsdl.org
authorRyan C. Gordon <icculus@icculus.org>
Sat, 19 Nov 2005 18:30:17 +0000
changeset 27933311d0a5d0d
parent 278 d5d67781b433
child 280 1e6fd744d20c
To: sdl@libsdl.org
From: Rainer Deyke <rainerd@eldwood.com>
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
     1.1 --- a/music.c	Tue Aug 23 06:33:08 2005 +0000
     1.2 +++ b/music.c	Sat Nov 19 18:30:17 2005 +0000
     1.3 @@ -1385,6 +1385,16 @@
     1.4  		if (music->data.module==NULL) {
     1.5  			Mix_SetError("%s",MikMod_strerror(MikMod_errno));
     1.6  			music->error=1;
     1.7 +		} else {
     1.8 +			/* Stop implicit looping, fade out and other flags. */
     1.9 +			music->data.module->extspd  = 1;
    1.10 +			music->data.module->panflag = 1;
    1.11 +			music->data.module->wrap    = 0;
    1.12 +			music->data.module->loop    = 0;
    1.13 +#if 0 /* Don't set fade out by default - unfortunately there's no real way
    1.14 +         to query the status of the song or set trigger actions.  Hum. */
    1.15 +			music->data.module->fadeout = 1;
    1.16 +#endif
    1.17  		}
    1.18  	} else
    1.19  #endif