|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.SoundClip
SoundClip is a sound clip. The sound clip is loaded and then played when requested. Support will soon be added for looping the sound and stopping the sound.
SoundClip s = new SoundClip("sound.wav");
s.play(PLAY_ASYNC);
| Field Summary | |
byte[] |
data
|
int |
fixedData
|
static int |
PLAY_ASYNC
Play asynchronously |
static int |
PLAY_LOOP
Loop the sound until stop() is called |
static int |
PLAY_NOSTOP
Don't stop any currently playing sound |
static int |
PLAY_SYNC
Play synchronously (default) |
int |
playStatus
|
| Constructor Summary | |
SoundClip(byte[] waveData)
|
|
SoundClip(Class requestor,
String path)
Loads and constructs a sound clip from a resource. |
|
SoundClip(String path)
Loads and constructs a sound clip from a resource. |
|
| Method Summary | |
void |
finalize()
This method (when overriden), will be called when the VM determines that the Object can be garbage collected. |
void |
free()
|
boolean |
play(int options)
Plays the sound clip. |
boolean |
stop()
Stop the currently playing sound. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, toString |
| Field Detail |
public byte[] data
public int playStatus
public int fixedData
public static final int PLAY_SYNC
public static final int PLAY_ASYNC
public static final int PLAY_LOOP
public static final int PLAY_NOSTOP
| Constructor Detail |
public SoundClip(Class requestor,
String path)
public SoundClip(String path)
public SoundClip(byte[] waveData)
| Method Detail |
public boolean play(int options)
options - Can be one of the PLAY_XXXX options.
public boolean stop()
public void free()
public void finalize()
ObjectThe finalize() method of a Class is only called if it overrides finalize() - the finalize() method java.lang.Object is never called by the Ewe VM.
Note that under a native Ewe VM, the call to finalize() will be synchronized with the Ewe library, but under a Java VM, the finalize() method may be called by a separate Thread that is not synchronized with the Ewe library. To ensure that the execution of the finalize() method is sychronized with the Ewe library your finalize() method should look like this:
protected void finalize()
{
synchronized(ewe.sys.Vm.getSyncObject()){
//
// Put your finalize() code here.
//
}
}
Under Ewe the synchronized keyword is silently ignored.
finalize in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||