Class JavaSoundPlayer
java.lang.Object
nl.colorize.multimedialib.renderer.java2d.JavaSoundPlayer
- All Implemented Interfaces:
EventListener
,LineListener
,Audio
Plays audio clips using Java Sound. By default, Java Sound is unable to play
common audio formats such as MP3, so support for additional audio formats
therefore relies on external service providers.
-
Constructor Details
-
JavaSoundPlayer
public JavaSoundPlayer(nl.colorize.util.ResourceFile file)
-
-
Method Details
-
play
public void play(int volume, boolean loop) Description copied from interface:Audio
Starts playing this audio clip.volume
is in the range 0-100, where 100 indicates the audio clip's normal volume and 0 indicates the audio clip is muted. Calling this method does nothing if playback of this audio clip is already in progress. -
stop
public void stop()Description copied from interface:Audio
Stops playback of this audio clip and resets the playhead to the start of the audio clip. Calling this method does nothing if this audio clip is not currently playing. -
update
- Specified by:
update
in interfaceLineListener
-