com.vwp.sound.mod.modplay
Class ThreadedPlayer

java.lang.Object
  extended by com.vwp.sound.mod.modplay.Player
      extended by com.vwp.sound.mod.modplay.ThreadedPlayer
All Implemented Interfaces:
java.lang.Runnable

public class ThreadedPlayer
extends Player
implements java.lang.Runnable

a threaded player interface. You should probably not call it's play() method directly after starting the player thread. That is very likely to cause "issues"...


Constructor Summary
ThreadedPlayer()
           
 
Method Summary
 java.lang.Throwable getFailiureCause()
          if an error occured while playing, use this to get the erro cause
 boolean hasFailed()
          check if an error has occured while playing
 boolean isPaused()
          check if the module is paused
 boolean isRunning()
          check if the player thread is still running
 void pause(boolean pause)
          pause the player thread
 void run()
           
 void start()
          start playing the module
 void stop()
          stop playing the module and the player thread
 
Methods inherited from class com.vwp.sound.mod.modplay.Player
close, getAmplification, getBalance, getDefaultAmplification, getDivision, getModule, getModuleState, getNote, getPosition, getSeparation, getTick, getVolume, init, load, load, load, mute, mute, play, setAmplification, setBalance, setPosition, setSeparation, setVolume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadedPlayer

public ThreadedPlayer()
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable
See Also:
Runnable.run()

start

public void start()
start playing the module


stop

public void stop()
stop playing the module and the player thread


isRunning

public boolean isRunning()
check if the player thread is still running

Returns:

pause

public void pause(boolean pause)
pause the player thread

Parameters:
pause -

isPaused

public boolean isPaused()
check if the module is paused

Returns:

hasFailed

public boolean hasFailed()
check if an error has occured while playing

Returns:

getFailiureCause

public java.lang.Throwable getFailiureCause()
if an error occured while playing, use this to get the erro cause

Returns: