javazoom.jl.player.advanced
Class AdvancedPlayer
java.lang.Object
javazoom.jl.player.advanced.AdvancedPlayer
public class AdvancedPlayer
extends java.lang.Object
a hybrid of javazoom.jl.player.Player tweeked to include play(startFrame, endFrame)
hopefully this will be included in the api
AdvancedPlayer
public AdvancedPlayer(InputStream stream)
throws JavaLayerException
Creates a new Player
instance.
close
public void close()
Cloases this player. Any audio currently playing is stopped
immediately.
decodeFrame
protected boolean decodeFrame()
throws JavaLayerException
Decodes a single frame.
- true if there are no more frames to decode, false otherwise.
getPlayBackListener
public PlaybackListener getPlayBackListener()
gets the PlaybackListener
play
public boolean play(int frames)
throws JavaLayerException
Plays a number of MPEG audio frames.
frames
- The number of frames to play.
- true if the last frame was played, or false if there are
more frames.
play
public boolean play(int start,
int end)
throws JavaLayerException
Plays a range of MPEG audio frames
start
- The first frame to playend
- The last frame to play
- true if the last frame was played, or false if there are more frames.
setPlayBackListener
public void setPlayBackListener(PlaybackListener listener)
sets the PlaybackListener
skipFrame
protected boolean skipFrame()
throws JavaLayerException
skips over a single frame
- false if there are no more frames to decode, true otherwise.
stop
public void stop()
closes the player and notifies PlaybackListener
JavaZOOM 1999-2005