|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--audiojury.proxy.SoundUtility
Contains common sound playback operations carried out by the client and the administrator program.
Please note, for proper operation we usually do not recommend more than one thread per soundUtility
object, unless you know what you are doing!
Constructor Summary | |
SoundUtility()
Creates a new SoundUtility object. |
Method Summary | |
boolean |
playSound(java.lang.String folderpath,
Sound snd)
Plays back a Sound .
|
boolean |
playWaveFile(java.lang.String filename)
Plays a sound file in the wave format. |
void |
stopPlayback()
Stops all play back using this instance of the SoundUtility .
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SoundUtility()
SoundUtility
object.
Method Detail |
public boolean playSound(java.lang.String folderpath, Sound snd)
Sound
.
The call does not return until the the sound has finished playing.
For that reason never call this function directly from a GUI since this might make the GUI stop responding.
Instead encapsulate the call inside a SwingWorker
.
folderpath
- The path to the directory containing the actual sound file in the Sound
.snd
- The Sound
to play.
Sound
, false otherwise.public boolean playWaveFile(java.lang.String filename)
SwingWorker
.
public void stopPlayback()
SoundUtility
.
Call this method to request that all current threads using this instance
of the soundUtility
object stop their respective playback.soundUtility
object, unless you know what you are doing!
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |