Date: Fri, 24 Dec 2004 16:11:30 +0100
authorSam Lantinga <slouken@libsdl.org>
Sun, 29 Jan 2006 06:47:14 +0000
changeset 2859274a084491d
parent 284 d7f32c4e340e
child 286 9a5e6bffa3b7
Date: Fri, 24 Dec 2004 16:11:30 +0100
From: Gaetan de Menten
Subject: Re: [SDL] SDL_mixer and implicit looping of module music files

Maybe it will be clearer with this information copy-pasted from
Mikmod's documentation:

BOOL wrap
If nonzero, module wraps to its restart position when it is
finished, to play continuously. Default value is zero (play only
once).

BOOL loop
If nonzero, all in-module loops are processed; otherwise, backward
loops which decrease the current position are not processed (i.e. only
forward loops, and backward loops in the same pattern, are processed).
This ensures that the module never loops endlessly. The default value
is 1 (all loops are processed).

and this is from SDL_mixer's code:

music->data.module->wrap = 0;
music->data.module->loop = 0;

What I don't like is the loop = 0 (note it is not the default value in
mikmod) and that there is no way to change it, the wrap = 0 is fine
with me.

-Gaetan.
music.c
     1.1 --- a/music.c	Tue Jan 24 06:50:05 2006 +0000
     1.2 +++ b/music.c	Sun Jan 29 06:47:14 2006 +0000
     1.3 @@ -616,7 +616,7 @@
     1.4  			music->data.module->extspd  = 1;
     1.5  			music->data.module->panflag = 1;
     1.6  			music->data.module->wrap    = 0;
     1.7 -			music->data.module->loop    = 0;
     1.8 +			music->data.module->loop    = 1;
     1.9  #if 0 /* Don't set fade out by default - unfortunately there's no real way
    1.10           to query the status of the song or set trigger actions.  Hum. */
    1.11  			music->data.module->fadeout = 1;