Hello!
I have a problem: in a part of modules, when a tune is over, instead of jumping to a required pattern in the loop, the player loops the whole tune.
Also, if I minimize the window, the player make a pause.
Here is my code (some parts are omitted and added, but it’s not so matter):
public class ModLoopTest extends BasicGame {
//In this way we can play the modules from the beginning
OpenALMODPlayer mod=new OpenALMODPlayer();
public ModLoopTest(String title) {
super(title);
}
@Override
public void render(GameContainer gc, Graphics g) throws SlickException {
}
@Override
public void init(GameContainer gc) throws SlickException {
mod.init();
try {
mod.play(ResourceLoader.getResourceAsStream("res/classic_tunes.mod"), true, true);
} catch (IOException e) {
e.printStackTrace();
}
}
@Override
public void update(GameContainer gc, int delta) throws SlickException {
mod.update();
}
public static void main(String[] args) {
try {
AppGameContainer a=new AppGameContainer(new ModLoopTest("Mod loop test"), 640, 480, false);
a.setTargetFrameRate(60);
a.start();
} catch (SlickException e) {
e.printStackTrace();
}
}
}