|
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uwcse.io.Sound
A simple sound class. Sounds can be played using the AudioPlayer class. Sounds can come from files or from URLs (web addresses). At least .wav, and possibly other formats, are supported.
Constructor Summary | |
Sound(java.lang.String fileName)
Create a new sound, loading from the given filename. |
|
Sound(java.net.URL url)
Create a new sound, loading from the given URL. |
Method Summary | |
java.applet.AudioClip |
getClip()
Answer the AudioClip for this sound. |
void |
loop()
Play the sound repeatedly, until told to stop. |
void |
play()
Play the sound once, or until told to stop. |
void |
stop()
Stop playing the sound. |
static void |
test()
A test method that repeatedly asks for a URL and then plays the sound given |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Sound(java.lang.String fileName)
public Sound(java.net.URL url)
Method Detail |
public java.applet.AudioClip getClip()
public void loop()
public void play()
public void stop()
public static void test()
|
||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |