|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The Audio interface is a simple abstraction for playing music or
a sound effect. When this object is no longer needed, the
dispose() method should be invoked.
| Method Summary | |
void |
clearAudioListener()
Unregisters the AudioListener if there is one. |
void |
dispose()
Releases any system resources used by this object. |
void |
setAudioListener(AudioListener audioListener)
Registers an AudioListener with this Audio
object to receive notification of when the audio stops. |
| Methods inherited from interface java.applet.AudioClip |
loop, play, stop |
| Method Detail |
public void setAudioListener(AudioListener audioListener)
AudioListener with this Audio
object to receive notification of when the audio stops.
audioListener - Called back when the audio stops.public void clearAudioListener()
AudioListener if there is one. This method is
equivalent to passing null to setAudioListener().
public void dispose()
Releases any system resources used by this object. An Audio
object cannot be used after calling this method.
The finalization process of the garbage collector also disposes of the same system resources; however, since the finalization process may not run to completion for a long duration, it is preferable to manually free the resources by invoking this method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||