|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--kiwi.ui.AudioClip
This class represents an audio clip. The audio data is restricted to the 8000Hz, single-channel u-law format. The class relies on the undocumented sun.audio package and thus may not be portable.
AudioClip
s may be read from streams, from files, or loaded as
system resources using a ResourceManager
or
ResourceLoader
.
ResourceManager.getSound(java.lang.String)
,
ResourceLoader.getResourceAsURL(java.lang.String)
Constructor Summary | |
AudioClip(InputStream stream)
Construct a new AudioClip . |
|
AudioClip(String file)
Construct a new AudioClip . |
|
AudioClip(URL url)
Construct a new AudioClip . |
Method Summary | |
void |
loop()
Play the audio clip continuously. |
void |
play()
Play the audio clip. |
void |
stop()
Stop playing the audio clip. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public AudioClip(URL url) throws IOException
AudioClip
.url
- The location of the audio data.public AudioClip(String file) throws IOException
AudioClip
.filename
- The name of the file that contains the audio data.public AudioClip(InputStream stream) throws IOException
AudioClip
.stream
- The stream to read the audio data from.Method Detail |
public void play()
public void loop()
public void stop()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |