package djmania.file.audio;

/**
 * (Player Template) Audio player thread template.
 * <p>
 * Template from which audio player threads extend. 
 * Used by the {@link djmania.file.AudioReader} class.
 * <p>
 * Licensed under <A HREF="http://www.gnu.org/licenses/gpl.txt">GNU GPL (Version 3)</A>. 
 * <p>
 * @author	Philip Peng
 * @version	1.0 27-Oct-07
 * 
 */

public class AudioPlayerThread extends Thread {
	
	/**
	 * Always use an empty constructor. 
	 * Set the playback stream afterwards 
	 * using setStream.
	 */
	public AudioPlayerThread() {}

	/**
	 * Sets the playback stream.
	 * @param	file	Path to audio file.
	 * @return	-1 if file not found, 0 if failed, 1 if successful.
	 */
	public int setStream(String file) {	return 0; }
	
	/**
	 * Returns playback position.
	 * @return	Playback position in milliseconds.
	 */
	public int getPosition() { return 0; }
	
	/**
	 * Pause playback.
	 */
	public void pausePlayback() {}
	
	/**
	 * Resume playback. 
	 * For some players, if things are not paused, 
	 * this will do nothing.
	 */
	public void resumePlayback() {}
	
	/**
	 * Force stop playback and close resources.
	 */
	public void close() {}
	
	/**
	 * Start thread and playback. 
	 * Auto closes once done.
	 */
	public void run() {}
	
}
