|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.kolls.railworld.Sound
net.kolls.railworld.sound.StreamSound
public class StreamSound
Stream sound puts the details of sound playback in the program's hands. Requires more overhead but may allow for better sound behavior?
| Field Summary |
|---|
| Fields inherited from class net.kolls.railworld.Sound |
|---|
frozen, fzlc, loopcnt |
| Constructor Summary | |
|---|---|
StreamSound(java.net.URL filen,
boolean restart)
Create a stream sound. |
|
| Method Summary | |
|---|---|
boolean |
canPlay()
Is the sound loaded and ready to play? |
void |
loop()
Loop the sound. |
void |
play()
Play the sound. |
boolean |
playing()
Indicate if the sound is currently playing or looping. |
void |
stop()
Stop the sound. |
| Methods inherited from class net.kolls.railworld.Sound |
|---|
freeze, unfreeze |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamSound(java.net.URL filen,
boolean restart)
filen - URL of sound sourcerestart - Restart sound if play command given while currently playing| Method Detail |
|---|
public boolean canPlay()
Sound
canPlay in class Soundtrue if the sound can be played.public void play()
Sound
play in class Soundpublic void loop()
Sound
loop in class Soundpublic void stop()
Sound
stop in class Soundpublic boolean playing()
Sound
playing in class Soundtrue if the sound is playing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||