Javafx AudioClip not looping

Viewed 1578

Now, I assume that this can be due to any number of issues in my gui's code, but, I want to ask, is there anything blatantly wrong with the following code?

public class music 
{
    static AudioClip currentMusic;

    public static void playMusic()
    {
        currentMusic = new AudioClip(Paths.get("src/test.mp3").toUri().toString());
        currentMusic.setCycleCount(INDEFINITE);
        currentMusic.play();
    }
}

The AudioClip loads properly, plays properly, but no matter what the setCycleCount value is, it always stops after playing once.

4 Answers
Related