public abstract class SoundPlayer
extends java.lang.Object
| Constructor and Description |
|---|
SoundPlayer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
backgroundMusic(java.lang.String fileName) |
static void |
playSound(java.lang.String fileName) |
public static void playSound(java.lang.String fileName)
throws javax.sound.sampled.UnsupportedAudioFileException,
java.io.IOException,
javax.sound.sampled.LineUnavailableException
filename - the name of the file that is going to be playedjava.io.IOExceptionjavax.sound.sampled.UnsupportedAudioFileExceptionjavax.sound.sampled.LineUnavailableExceptionpublic static void backgroundMusic(java.lang.String fileName)
throws javax.sound.sampled.UnsupportedAudioFileException,
java.io.IOException,
javax.sound.sampled.LineUnavailableException
javax.sound.sampled.UnsupportedAudioFileExceptionjava.io.IOExceptionjavax.sound.sampled.LineUnavailableException