import javazoom.jl.player.advanced.PlaybackListener;
import javazoom.jl.player.advanced.PlaybackEvent;

public class LoopListener extends PlaybackListener
  {
    public void playbackStarted(PlaybackEvent evt)
    {
      //while (true) {
    	System.out.println("Frame " + evt.getFrame());
      //}
    }

    public void playbackFinished(PlaybackEvent evt)
    {
      System.out.println("Play completed at frame " + evt.getFrame());
      System.exit(0);
    }
}