gameframe.engines.jdk12x
Class CSoundEngine.CJava2Music
java.lang.Object
|
+--gameframe.engines.jdk12x.CSoundEngine.CJava2Music
- All Implemented Interfaces:
- Music, Sound
- Enclosing class:
- CSoundEngine
- class CSoundEngine.CJava2Music
- extends java.lang.Object
- implements Music
Implementation of music that implements a Java 2 sound clip.
Constructor Summary |
(package private) |
CSoundEngine.CJava2Music(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
music from the list of created music clips. |
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 |
stop()
Stops playing the given sample |
Methods inherited from class java.lang.Object |
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
m_audioClip
private java.applet.AudioClip m_audioClip
m_fileLocation
private java.net.URL m_fileLocation
m_fPlaying
private boolean m_fPlaying
m_pan
private float m_pan
m_volume
private float m_volume
CSoundEngine.CJava2Music
CSoundEngine.CJava2Music(java.applet.AudioClip audioClip,
java.net.URL fileLocation)
- Constructs a new Java 2 sound clip from the given parameters.
- Parameters:
audioClip
- The audio clip object used to play the sounds.fileLocation
- The audio clip file location URL.
playOnce
public void playOnce()
- Plays this sample once and then stops
- Specified by:
playOnce
in interface Sound
playLooped
public void playLooped()
- Plays the given sample over and over again (looping).
- Specified by:
playLooped
in interface Sound
stop
public void stop()
- Stops playing the given sample
- Specified by:
stop
in interface Sound
finalize
public void finalize()
- Upon finalization stop everything (just in case) and remove this
music from the list of created music clips.
- Specified by:
finalize
in interface Sound
- Overrides:
finalize
in class java.lang.Object
isPlaying
public boolean isPlaying()
- Returns true if sound should be playing at the moment
- Specified by:
isPlaying
in interface Sound