|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gameframe.engines.jdk12x.CSoundEngine.CJava2Sample
Implementation of Sound that implements a Java 2 sound clip.
Field Summary | |
private java.applet.AudioClip |
m_audioClip
|
private java.net.URL |
m_fileLocation
|
private boolean |
m_fPlaying
|
private float |
m_pan
|
private float |
m_volume
|
Constructor Summary | |
(package private) |
CSoundEngine.CJava2Sample(java.applet.AudioClip audioClip,
java.net.URL fileLocation)
Constructs a new Java 2 sound clip from the given parameters. |
Method Summary | |
void |
finalize()
Upon finalization stop everything (just in case) and remove this sound clip from the list of created sound clips. |
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. |
boolean |
isPlaying()
Returns true if sound should be playing at the moment |
void |
playLooped()
Plays the given sample over and over again (looping). |
void |
playOnce()
Plays this sample once and then stops |
void |
setPan(float pan)
Sets the pan of the sound. |
void |
setVolume(float volume)
Sets the volume of the sound. |
void |
stop()
Stops playing the given sample |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.applet.AudioClip m_audioClip
private java.net.URL m_fileLocation
private boolean m_fPlaying
private float m_pan
private float m_volume
Constructor Detail |
CSoundEngine.CJava2Sample(java.applet.AudioClip audioClip, java.net.URL fileLocation)
audioClip
- The audio clip object used to play the sounds.fileLocation
- The audio clip file location URL.Method Detail |
public void playOnce()
playOnce
in interface Sound
public void playLooped()
playLooped
in interface Sound
public void stop()
stop
in interface Sound
public Sample getCopy()
getCopy
in interface Sample
public void finalize()
finalize
in interface Sound
finalize
in class java.lang.Object
public boolean isPlaying()
isPlaying
in interface Sound
public void setVolume(float volume)
setVolume
in interface Sample
volume
- The sounds volume.public void setPan(float pan)
setPan
in interface Sample
pan
- The pan of the sound.public float getVolume()
getVolume
in interface Sample
public float getPan()
getPan
in interface Sample
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |