gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Loop playback of MOD sound file

#132098 - RandomTiger - Sat Jun 23, 2007 12:43 pm

Hi, can anyone tell me how to loop playback of a mod audio file forever?

#132105 - tepples - Sat Jun 23, 2007 2:16 pm

The MOD format has a "goto" command (Bxx). Is it that your MOD player is ignoring "goto" commands? (This is more common among players with a playlist feature so that they don't get hung up on a single file for a half hour.)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#132108 - RandomTiger - Sat Jun 23, 2007 2:40 pm

Ah... awesome, I was trying to do it in code.
I had no idea, thankyou.

How can I set this in an existing mod file?

#132120 - kusma - Sat Jun 23, 2007 4:56 pm

Protracker-modules are looping by nature. They contain a field of where in the order-table to jump once the end of the order-table has been reached. If a player doesn't listen to this field, then it's either broken or there's an option for disabling it (due to playlists as tepples pointed out). There should be no need for any jump-commands.

For us to be able to help you with looping with code, we need to know more about the context. For starters, how do you playback the module in the first place?

#132182 - RandomTiger - Sun Jun 24, 2007 10:28 am

I converted the mod from a midi using PTMID.
And Im playing it using the PA_PlayMod call.

#132189 - tepples - Sun Jun 24, 2007 12:59 pm

RandomTiger wrote:
How can I set this in an existing mod file?

Modplug Tracker.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#132336 - xrl - Tue Jun 26, 2007 1:06 am

RandomTiger wrote:
I converted the mod from a midi using PTMID.
And Im playing it using the PA_PlayMod call.
That MUST sound bad :|
From what you're using the simple solution is to edit the file using a tracker like MPT, or Milkytracker, or any other tracker.

#132683 - RandomTiger - Thu Jun 28, 2007 6:27 pm

Yer, its not the best.
I will try these tools you suggest.
Again, thanks for the info.