package battleship;
import sun.audio.*;
import java.io.*;
public class Sound // Holds one audio file
{
public void playIntro()
{
AudioStream bGM;
try{
bGM = new AudioStream(new FileInputStream("intro.wav"));
AudioPlayer.player.start(bGM);
} catch (IOException error){}
}
}
I have that on one of my games and the music doesnt run, any help? If I place AudioPlayer.player.run(); after the first autoplayer I get the music to run, but the rest of my program won't continue after that method call.