import javazoom.jl.player.*;
import java.io.*;


public class MP3PlayerThreadTest {
	
	
	static Player playerTest;
	static InputStream input;
	static int position = 0;
	
	/**
	 * Just for testing MP3PlayerThread
	 */
	public static void main( String[] args ) {
		
		try {
			input = new FileInputStream( "C:\\foobar.mp3" );
			playerTest = new Player(input);
		} catch ( Exception e ) {
			e.printStackTrace();
		}
		
		MP3PlayerThread pt = new MP3PlayerThread(playerTest);
		pt.start();
		
		while( !playerTest.isComplete() ) {
			position = playerTest.getPosition();
			System.out.println( position );
		}
		
	}
	
}
