check sound added in sound class
This commit is contained in:
parent
31571fcd99
commit
f1e22e6b14
Binary file not shown.
|
|
@ -40,4 +40,16 @@ public class SoundEffect {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
public void checkSound() {
|
||||
|
||||
try {
|
||||
File file = new File("Voicy_Battle-Droid-Problem.wav");
|
||||
AudioInputStream audioStream = AudioSystem.getAudioInputStream(file);
|
||||
Clip clip = AudioSystem.getClip();
|
||||
clip.open(audioStream);
|
||||
clip.start();
|
||||
} catch (UnsupportedAudioFileException | IOException | LineUnavailableException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue