/**
 * MP3 Player class
 * 
 * Code based on sample by Steven Haines
 * Original sample code:
 * http://www.informit.com/guides/content.aspx?g=java&seqNum=290
 * 
 * Uses JLayer 1.0 library for MP3 playback
 * http://www.javazoom.net/javalayer/sources.html
 * 
 * Modified by Philip Peng
 * Last updated: 2007/10/09
 * 
 */

// Imports
import javazoom.jl.player.*;

import java.io.*;

public class MP3PlayerThread extends Thread {
	
	private Player player;
	private InputStream input;
	
	public void run( String filename ) {
		
		// Set file stream
		try {
			input = new FileInputStream( filename );
		} catch ( Exception e ) {
			e.printStackTrace();
		}
		
		try {
			
			player.play();
			
		} catch( Exception e ) {
			e.printStackTrace();
		}
	}

}
