Background music now loops instead of playing once

This commit is contained in:
Bokros Bálint 2016-05-15 20:25:21 +02:00
parent 893294b227
commit 49072956a7

View File

@ -37,7 +37,7 @@ public class Display extends JPanel{
AudioSystem.getAudioInputStream(new URL("http://users.hszk.bme.hu/~bb1376/tomboy.wav"))) { AudioSystem.getAudioInputStream(new URL("http://users.hszk.bme.hu/~bb1376/tomboy.wav"))) {
clip = AudioSystem.getClip(); clip = AudioSystem.getClip();
clip.open(ais); clip.open(ais);
clip.start(); clip.loop(Clip.LOOP_CONTINUOUSLY);
} }
catch(Exception e) { catch(Exception e) {
e.printStackTrace(System.out); e.printStackTrace(System.out);