Yesterday I I found a way to NOT load music files to memory, instead just stream the file directly through the disk, but it only works for a second, take note that making
streamingHint = false;
loads it to memory, which making load times slower, which I don't like to happen... but it fixes the problem...
I do not believe in the saying "if it works, do not touch it", but in regards to optimization, this wasn't the case... but if there is no possible fix, I'm going to switch on something else cuz this lib was so outdated, or just accept loading it to the memory...
here's the code:
package johnkennedypena;
import org.newdawn.slick.Music;
import org.newdawn.slick.SlickException;
public class DebugStreamingHint {
Music music;
public DebugStreamingHint() throws SlickException {
music = new Music("resources_/music_/music_.ogg", true);
music.play();
}
public static void main(String[] args) throws InterruptedException, SlickException {
new DebugStreamingHint();
Thread.sleep(100000);
}
}
I'm using Windows... My JDK version was Java 8... I use IntelliJ as IDE...
I figured it out! I found Music.poll(int delta) by digging through the slick2d source.
Thanks @OldTeaOwl.