|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the interface for a representation of a sample. Offers methods for panning, attennuating and controlling the playback of the sample.
Method Summary | |
Sample |
getCopy()
Returns a copy of this sound object that is independent from the original sound object. |
float |
getPan()
Returns the pan of the sound. |
float |
getVolume()
Returns the volume of the sound. |
void |
setPan(float pan)
Sets the pan of the sound. |
void |
setVolume(float volume)
Sets the volume of the sound. |
Methods inherited from interface gameframe.sound.Sound |
finalize, isPlaying, playLooped, playOnce, stop |
Method Detail |
public void setVolume(float volume)
Sets the volume of the sound. Value of 0.0 means that the sound should be inaudible and value of 1.0 means the sound is played at its normal volume. Values above 1.0 are treated as 1.0 and values below 0.0 are treated as 0.0.
NOTE: This feature is optional as it can't be supported on all platform implementations, but all implementations offer at least a "do nothing" method.
volume
- The sounds volume.public void setPan(float pan)
Sets the pan of the sound. Value of -1.0 means that the sound will be heard only from the left speaker and value of 1.0 means that the sound will be heard only from the right speaker. Value of 0.0 means that the sound is heard with equal volume from both speakers. Values above 1.0 are treated as 1.0 and values below -1.0 are treated as -1.0.
NOTE: This feature is optional as it can't be supported on all platform implementations, but all implementations offer at least a "do nothing" method.
pan
- The pan of the sound.public float getVolume()
public float getPan()
Returns the pan of the sound. Value of -1.0 means that the sound will be heard only from the left speaker and value of 1.0 means that the sound will be heard only from the right speaker. Value of 0.0 means that the sound is heard with equal volume from both speakers.
NOTE: This feature is optional as it can't be supported on all platform implementations, but all implementations offer at least a "do nothing" method.
public Sample getCopy()
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |