9 package micropolisj.engine;
13 import javax.sound.sampled.AudioSystem;
14 import javax.sound.sampled.Clip;
46 this.wavName = wavName;
50 return getAudioFile(
"wav");
58 String n2 =
"/sounds/" + wavName +
"." + fileEnding;
59 URL u =
Sound.class.getResource(n2);
64 playSound(sound,
"wav");
68 System.out.println(
"playing a sound");
77 Clip clip = AudioSystem.getClip();
78 clip.open(AudioSystem.getAudioInputStream(afile));
82 e.printStackTrace(System.err);