Class AdvancedPlayer

java.lang.Object
javazoom.jl.player.advanced.AdvancedPlayer

public class AdvancedPlayer extends Object
a hybrid of javazoom.jl.player.Player tweeked to include play(startFrame, endFrame) hopefully this will be included in the api
  • Constructor Details

  • Method Details

    • play

      public void play() throws JavaLayerException
      Throws:
      JavaLayerException
    • play

      public boolean play(int frames) throws JavaLayerException
      Plays a number of MPEG audio frames.
      Parameters:
      frames - The number of frames to play.
      Returns:
      true if the last frame was played, or false if there are more frames.
      Throws:
      JavaLayerException
    • close

      public void close()
      Cloases this player. Any audio currently playing is stopped immediately.
    • decodeFrame

      protected boolean decodeFrame() throws JavaLayerException
      Decodes a single frame.
      Returns:
      true if there are no more frames to decode, false otherwise.
      Throws:
      JavaLayerException
    • skipFrame

      protected boolean skipFrame() throws JavaLayerException
      skips over a single frame
      Returns:
      false if there are no more frames to decode, true otherwise.
      Throws:
      JavaLayerException
    • play

      public boolean play(int start, int end) throws JavaLayerException
      Plays a range of MPEG audio frames
      Parameters:
      start - The first frame to play
      end - The last frame to play
      Returns:
      true if the last frame was played, or false if there are more frames.
      Throws:
      JavaLayerException
    • setPlayBackListener

      public void setPlayBackListener(PlaybackListener listener)
      sets the PlaybackListener
    • getPlayBackListener

      public PlaybackListener getPlayBackListener()
      gets the PlaybackListener
    • stop

      public void stop()
      closes the player and notifies PlaybackListener