I'm trying to get this program to loop the song infinitely, but I've only managed to get it working once. Any advice?
Here is my code:
public static void music(){
String filename = "darkAura.wav";
ContinuousAudioDataStream loop = null;
InputStream in = null;
try {
in = new FileInputStream(filename);
} catch (FileNotFoundException ex) {
System.out.println("File not found");
}
try {
AudioStream s = new AudioStream(in);
AudioData MD;
AudioPlayer.player.start(s);
} catch (IOException ex) {
System.out.println(ex.getMessage());
}
}