|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectfang.SequentialSound
public abstract class SequentialSound
This class can play only one sound at a time. Once the sound has played to completion, it can be replayed. SequentialSound is the base class for MidiSound and SampledSound, and the Sound class contains a collection of SequentialSound to play sounds simultaneously.
| Constructor Summary | |
|---|---|
SequentialSound()
|
|
| Method Summary | |
|---|---|
abstract double |
getClipLength()
gets the duration of this sound in seconds |
abstract double |
getClipPosition()
gets the clip position in seconds |
abstract SequentialSound |
getDuplicate()
gets a sound that is just like this one in its default initially constructed state |
abstract int |
getLoopsLeft()
gets how many times the sound will play through until it stops. |
double |
getPan()
|
double |
getVolume()
gets the multiplier that has been added to this sound. |
boolean |
isFinishedPlaying()
determines if this sound is done playing. |
abstract boolean |
isLoaded()
determines if the sound clip has been entirely loaded. |
boolean |
isLooping()
tells whether the sound is currently looping |
abstract boolean |
isMuted()
determines if the sound is audible when the clip is playing |
abstract boolean |
isPaused()
determines if the sound is currently responding to the change in time. |
boolean |
isPlaying()
tells whether the clip is currently audible and not yet at the end |
void |
loop()
plays the sound repeatedly |
abstract void |
mute()
makes the sound inaudible |
abstract void |
pause()
stops the sound keeping the current position |
abstract void |
play()
starts the sound playing |
void |
play(double pan)
plays the sound, controlling the panning left or right |
void |
resume()
plays the sound from its current location in time |
abstract void |
setClipPosition(double time)
sets the clip position in seconds. |
abstract void |
setLooping(boolean doLoop)
sets whether the sound should loop or not |
abstract void |
setLooping(int loops)
sets how many times the sound should play before terminating |
void |
setPan(double pan)
|
void |
setVolume(double volume)
sets the volume of this clip. |
void |
start()
starts the clip playing from the beginning |
void |
stop()
sets the clip position to the end to stop the clip from playing |
abstract void |
turnSoundOn()
makes the sound audible |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SequentialSound()
| Method Detail |
|---|
public abstract double getClipPosition()
public abstract void setClipPosition(double time)
time - the seconds from the start
of the soundpublic abstract double getClipLength()
public abstract void play()
public abstract void pause()
public abstract void mute()
public abstract void turnSoundOn()
public abstract void setLooping(boolean doLoop)
doLoop - true indicates the sound should
loop indefinitely, false means to terminate
playback at the end of the clip's durationpublic abstract void setLooping(int loops)
loops - the number of times to play the
sound before stopping. The default is 1.public abstract int getLoopsLeft()
public abstract boolean isLoaded()
public abstract boolean isMuted()
public abstract boolean isPaused()
public abstract SequentialSound getDuplicate()
public boolean isFinishedPlaying()
public void setVolume(double volume)
volume - the multiplier to affect the volumepublic double getVolume()
public void setPan(double pan)
public double getPan()
public void start()
public void stop()
public void play(double pan)
pan - the side on which to play where 0.0 is
entirely on the left and 1.0 is entirely on the right,
and 0.5 is evenly balanced. Any value between 0.0 and
1.0 is valid.public void loop()
public void resume()
public boolean isLooping()
public boolean isPlaying()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||