javazoom.jlgui.basicplayer
Interface BasicPlayerListener
public interface BasicPlayerListener
This interface defines callbacks methods that will be notified
for all registered BasicPlayerListener of BasicPlayer.
void | opened(Object stream, Map properties) - Open callback, stream is ready to play.
|
void | progress(int bytesread, long microseconds, byte[] pcmdata, Map properties) - Progress callback while playing.
|
void | setController(BasicController controller) - A handle to the BasicPlayer, plugins may control the player through
the controller (play, stop, ...)
|
void | stateUpdated(BasicPlayerEvent event) - Notification callback for basicplayer events such as opened, eom ...
|
opened
public void opened(Object stream,
Map properties)
Open callback, stream is ready to play.
properties map includes audio format dependant features such as
bitrate, duration, frequency, channels, number of frames, vbr flag,
id3v2/id3v1 (for MP3 only), comments (for Ogg Vorbis), ...
stream
- could be File, URL or InputStreamproperties
- audio stream properties.
progress
public void progress(int bytesread,
long microseconds,
byte[] pcmdata,
Map properties)
Progress callback while playing.
This method is called severals time per seconds while playing.
properties map includes audio format features such as
instant bitrate, microseconds position, current frame number, ...
bytesread
- from encoded stream.microseconds
- elapsed (reseted after a seek !).pcmdata
- PCM samples.properties
- audio stream parameters.
setController
public void setController(BasicController controller)
A handle to the BasicPlayer, plugins may control the player through
the controller (play, stop, ...)
controller
- : a handle to the player
stateUpdated
public void stateUpdated(BasicPlayerEvent event)
Notification callback for basicplayer events such as opened, eom ...
JavaZOOM 1999-2006