public abstract class AudioPlayThread
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
private PlayerListener |
listener |
protected AudioVectorMetaData |
song |
Constructor and Description |
---|
AudioPlayThread(AudioVectorMetaData song,
PlayerListener someoneToInform) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
doPlaying()
Play the audio file.
|
void |
run() |
abstract void |
stopPlaying()
Interrupt/Stop the playing.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
private final PlayerListener listener
protected final AudioVectorMetaData song
public AudioPlayThread(AudioVectorMetaData song, PlayerListener someoneToInform)
song
- the Song that will be played.someoneToInform
- someone to inform when the playing has ended.public final void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public abstract boolean doPlaying()
public abstract void stopPlaying()
doPlaying()
should return