import javazoom.jl.player.advanced.AdvancedPlayer;
import javazoom.jl.player.advanced.PlaybackListener;
import javazoom.jl.player.advanced.PlaybackEvent;
import java.io.FileInputStream;

public class TestMP3Player {


	public static void main(String[] args) 
		throws javazoom.jl.decoder.JavaLayerException, java.io.FileNotFoundException
	{
		
		FileInputStream foo = new FileInputStream("C:\\foobar.mp3");
		AdvancedPlayer bar = new AdvancedPlayer(foo);
		bar.setPlayBackListener(new PlaybackListener() {
				public void playbackStarted(PlaybackEvent evt) {
					while (true) {
						System.out.println(evt.getFrame());
					}
				}
				
				public void playbackFinished(PlaybackEvent evt) {
				
				}
			}
		);
		bar.play();
	}

}
