javazoom.jl.player
public class Player extends Object
Player
class implements a simple player for playback
of an MPEG audio stream.
Since: 0.0.8
Constructor Summary | |
---|---|
Player(InputStream stream)
Creates a new Player instance. | |
Player(InputStream stream, AudioDevice device) |
Method Summary | |
---|---|
void | close()
Cloases this player. |
protected boolean | decodeFrame()
Decodes a single frame.
|
int | getPosition()
Retrieves the position in milliseconds of the current audio
sample being played. |
boolean | isComplete()
Returns the completed status of this player.
|
void | play() |
boolean | play(int frames)
Plays a number of MPEG audio frames.
|
Player
instance.Returns: true if there are no more frames to decode, false otherwise.
AudioDevice
that is used by this player to sound
the decoded audio samples.Returns: true if all available MPEG audio frames have been decoded, or false otherwise.
Parameters: frames The number of frames to play.
Returns: true if the last frame was played, or false if there are more frames.