alpha gdxmodplug with loop hook

This is a quick and dirty alpha version of gdxmodplug where I have added a hook to libmodplug's SetRepeatCount() method.

This should, in theory, allow a developer to loop a mod/it/xm song any number of times without modifying the song to add a Jump Command in the effects column in the last pattern.

Unfortunately, it hasn't been tested (Eclipse & AndroidStudio are fighting me), but I'll put it out there in case someone wants to test it. And I'll update the code and this page when I remove all the testing roadblocks I'm currently experiencing.

How do you use it?

Well, first - there's absolutely no error checking. I'll add that in the update soon, hopefully. So you have to call the new Java method ModPlug_SetLoopCount() AFTER you load a song and before you start playing it.

ModPlug_SetLoopCount() takes an integer argument. 0 to N for looping the song 0 or N times. AND you can supposedly pass an argument of -1 to cause the song to loop infinitely.

Like I say, test it out. And stay tuned!

Patrick Casey,
Aug 22, 2017, 2:14 PM