|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectyops.Sound
public class Sound
The Sound class provides methods for playing audio clips with an .au file extension. Students are advised that headphones are generally required in university computer centers.
| Constructor Summary | |
|---|---|
Sound()
|
|
| Method Summary | |
|---|---|
static AudioClip |
getSound(String filename)
Loads, but does not play, an audio clip from the given file |
static void |
loop(String filename)
Plays the audio clip repeatedly from the given file, loading the audio clip if necessary. |
static void |
main(String[] args)
|
static void |
play(String filename)
Plays the audio clip from the given file, loading the audio clip if necessary. |
static void |
stop(String filename)
Stops playing the named audio clip, if it is currently playing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sound()
| Method Detail |
|---|
public static AudioClip getSound(String filename)
filename - the name of the audio file
public static void play(String filename)
filename - the name of the audio filepublic static void loop(String filename)
filename - the name of the audio filepublic static void stop(String filename)
filename - the name of the audio filepublic static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||