|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutilities.Sound
public class Sound
Provides a way to play a sound through the computer's default sound hardware. WAV, AU, AIFF, and MIDI sound formats are all supported.
| Constructor Summary | |
|---|---|
Sound(String file)
Create a Sound that will play the given file |
|
Sound(URL url)
Create a Sound from the given URL |
|
| Method Summary | |
|---|---|
void |
loop()
Starts playing this sound in a loop |
void |
play()
Starts playing this sound |
void |
stop()
Stops playing this sound |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Sound(String file)
Sound that will play the given file
file - the full path of the file of the sound to be played.public Sound(URL url)
Sound from the given URL
url - the absolute URL of the sound to be played.| Method Detail |
|---|
public void play()
public void stop()
public void loop()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||