|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javazoom.jl.player.Player
public class Player
The Player
class implements a simple player for playback
of an MPEG audio stream.
Constructor Summary | |
---|---|
Player(java.io.InputStream stream)
Creates a new Player instance. |
|
Player(java.io.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Player(java.io.InputStream stream) throws JavaLayerException
Player
instance.
JavaLayerException
public Player(java.io.InputStream stream, AudioDevice device) throws JavaLayerException
JavaLayerException
Method Detail |
---|
public void play() throws JavaLayerException
JavaLayerException
public boolean play(int frames) throws JavaLayerException
frames
- The number of frames to play.
JavaLayerException
public void close()
public boolean isComplete()
public int getPosition()
AudioDevice
that is used by this player to sound
the decoded audio samples.
protected boolean decodeFrame() throws JavaLayerException
JavaLayerException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |