|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--speech.sound.AudioPlayer
The AudioPlayer class uses Java's AudioClip interface
to play several types of audio clips.
You can play AU, AIFF, WAV (PCM only) and MIDI formats.
AudioClip| Constructor Summary | |
AudioPlayer()
Creates a new AudioPlayer instance. |
|
| Method Summary | |
void |
clearCache()
Clears the sound cache. |
Enumeration |
getCacheKeys()
Gets the names of the files in the sound cache |
int |
getCacheSize()
Gets the size of the sound cache |
AudioClip |
load(URL soundFileName)
Loads a sound file into memory, for faster access in later calls. |
void |
play(URL soundFileName)
Plays a sound file named in soundFileName. |
void |
play(URL soundFileName,
boolean useCache)
Plays a sound file named in soundFileName. |
void |
unload(URL soundFileName)
Unloads an entry from the sound cache |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public AudioPlayer()
AudioPlayer instance.| Method Detail |
public AudioClip load(URL soundFileName)
soundFileName - a URL value of the name of the
sound file. This should include the full path.AudioClip value of the sound file referred to in
soundFileName.clearCache()public void play(URL soundFileName)
soundFileName - a URL value of the name of the
sound file. This should include the full path.play(URL, boolean),
clearCache()
public void play(URL soundFileName,
boolean useCache)
soundFileName - an URL value of the name of the
sound file. This should include the full path.useCache - a boolean valueplay(URL)public void clearCache()
public void unload(URL soundFileName)
soundFileName - an URL valuepublic Enumeration getCacheKeys()
Enumeration of URL namespublic int getCacheSize()
int value
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||