|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.kolls.railworld.Sound
public abstract class Sound
Allows playback of sound. The behavior is designed for multiple requestors to be handled automatically and each treated as if they are the only requestor. The sound can also be frozen (paused), although requests by requestors must still be processed as if the sound was playing. The multiple requestors are handled via a "loop count" which is incremented whenever a requestor asks for a loop and decremented whenever a requestor says "stop". Thus, "stop" may not actually stop the sound.
| Field Summary | |
|---|---|
protected boolean |
frozen
Is the sound frozen |
protected int |
fzlc
Frozen loop count |
protected int |
loopcnt
Loop count |
| Constructor Summary | |
|---|---|
Sound()
|
|
| Method Summary | |
|---|---|
abstract boolean |
canPlay()
Is the sound loaded and ready to play? |
void |
freeze()
Freeze the sound. |
abstract void |
loop()
Loop the sound. |
abstract void |
play()
Play the sound. |
abstract boolean |
playing()
Indicate if the sound is currently playing or looping. |
abstract void |
stop()
Stop the sound. |
void |
unfreeze()
Unfreeze the sound. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int fzlc
protected boolean frozen
protected int loopcnt
| Constructor Detail |
|---|
public Sound()
| Method Detail |
|---|
public abstract boolean canPlay()
true if the sound can be played.public abstract void play()
public abstract void loop()
public abstract void stop()
public abstract boolean playing()
true if the sound is playing.public void freeze()
public void unfreeze()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||