posted 17 years ago
Using the following code to play wavs.
Is there any way I can get it to loop until it has stopped playing?
Thanks in advance
Paul.
public static void PlayAudio(int audioNo)
{
if ( audioNo > NA )
try {
InputStream in = new FileInputStream("C:/DTaudio/" + AUDIO[audioNo] + ".wav");
AudioStream as = new AudioStream(in);
AudioPlayer.player.start(as);
} catch (FileNotFoundException e) {
System.err.println("FileNotFoundException: " + e.getMessage());
} catch (IOException e) {
System.err.println("Caught IOException: " + e.getMessage());
}
}