I’ve added Music to my game , almost everything works as supposed, however, when I want to replace the current music with the new one, delay appears for about 2-3s, and then it plays the new one. The problem is that this delay also affects the update method, and thus prevents updates of the other objects.
I guess it’s because I re-initialize an instance of the music, because, when I call the constructor for the music for a first time, it takes 2-3 seconds to load some music drivers…
Unfortunately, there isn’t a method in this Music class that allows you to replace the current music with the new one, except to re-initialize the instance with a new constructor.
Has anyone managed to solve this problem or if there is another class of Music you suggest, which allows you to swap music without delays, and that is compatible with Slick2D?