Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## waba.fx
Class SoundClip

    java.lang.Object
      |
      +--waba.fx.SoundClip

public final class SoundClip
extends Object

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();

Field Summary
`protected boolean` | `loaded`
`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

### path

    protected String path

### loaded

    protected boolean loaded

Constructor Detail

### SoundClip

    public SoundClip(String path)

  Loads and constructs a sound clip from a file. In Windows, you must specify the full path. In Palm OS 5

Method Detail

### play

    public boolean play()

  Plays the sound clip. Returns true if the sound starts playing and false otherwise.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD