From d2f14e7f4545d9b22fa260ee8f300dce5441da23 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 29 Jan 2006 06:47:14 +0000 Subject: [PATCH] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/music.c b/music.c index c2731906..656d2483 100644 --- a/music.c +++ b/music.c @@ -616,7 +616,7 @@ Mix_Music *Mix_LoadMUS(const char *file) music->data.module->extspd = 1; music->data.module->panflag = 1; music->data.module->wrap = 0; - music->data.module->loop = 0; + music->data.module->loop = 1; #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;