|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--waba.fx.SoundClip
SoundClip is a sound clip.
Support for sound clips varies between platforms. Under Java, sound clips are only supported by Java applets - not applications. This is primarily because AudioClips in Java weren't supported in Java applications until the JDK 1.2 without using undocumented method calls. Even when using applets, some Java virtual machines support .wav and .au sound files and some versions don't seem to support either format.
Using a SuperWaba Virtual Machine, .wav format sound clips are supported under Win32, WinCE and Palm OS 5. The SuperWaba VM under PalmOS smaller than 5 has no support for sound clips. Under Win32 and WinCE, the .wav files for sound clips must exist in a file outside of the programs warp (resource) file. In Palm OS 5, the wav must be added to the pdb (Warp does this automagically. Just reference a .wav and it will be added)
If you're playing a sound clip under a Windows CE device and you don't hear anything, make sure that the device is set to allow programs to play sounds. To check the setting, look at:
Start->Settings->Volume & Sounds
for the check box:
Enable sounds for: Programs
If it is not checked on, sound clips won't play.
Here is an example that plays a sound:
SoundClip s = new SoundClip("sound.wav"); s.play();Under Palm OS 5, the currently supported formats are: uncompressed (PCM) or IMA 4-bit adaptive differential (IMA ADPCM). The ADPCM type is also known as DVI ADPCM; in a WAVE file, it's known as format 0x11. One or two-channels; All normal sampling rates (8k, 11k, 22.05k, 44.1k, 48, 96k). Also, since it is going to be stored in a pdb, the wav's size is limited to 64kb.
Field Summary | |
protected String |
path
|
Constructor Summary | |
SoundClip(String path)
Loads and constructs a sound clip from a file. |
Method Summary | |
boolean |
play()
Plays the sound clip. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
Field Detail |
protected String path
Constructor Detail |
public SoundClip(String path)
Method Detail |
public boolean play()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |