List of usage examples for java.applet AudioClip loop
void loop();
From source file:Play.java
public static void main(String args[]) { try {/*from w w w . j a va 2 s .c om*/ // Loop URL url = new URL("http://java.sun.com/applets/other/Hangman/audio/whoopy.au"); AudioClip clip = Applet.newAudioClip(url); clip.loop(); Thread.sleep(5000); //Play File file = new File("bark.wav"); clip = Applet.newAudioClip(file.toURL()); clip.play(); Thread.sleep(500); System.exit(0); } catch (InterruptedException e) { } catch (MalformedURLException e) { } }