public class AudioEngineThread extends Thread
NOTE: this class is probably not needed for those Audio Device implementations that handle all dynamic parameters in the low-level audio library.
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
active
This indicates that this thread has been activated by MC
|
protected Object[] |
args
The arguments passed in for this thread
|
protected int |
classification
The classification of this thread.
|
protected static boolean |
debugFlag |
protected int |
instanceNum |
protected long |
lastWaitTimestamp
Use to assign threadOpts WAIT_ALL_THREADS
|
protected static int |
NOTIFY_AND_WAIT
This runMonitor action notifies MasterControl that this thread
has completed and wait.
|
protected static int |
numInstances
Some variables used to name threads correctly
|
protected long |
referenceTime
The time values passed into this thread
|
protected static int |
RUN
This runMonitor action tells the thread to run N number of
iterations.
|
protected boolean |
running
This indicates that this thread is alive and running
|
protected boolean |
started
This indicates that this thread is ready
|
protected static int |
STOP
This runMonitor action tells the thread to stop running
|
protected int |
type
The type of this thread.
|
protected static int |
UPDATE_THREAD |
protected boolean |
userStop
Flag to indicate that user initiate a thread stop
|
protected static int |
WAIT
This runMonitor action puts the thread into an initial wait state
|
protected boolean |
waiting
Flag to indicate that this thread is waiting to be notify
|
protected static int |
WORK_THREAD
The classification types.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
AudioEngineThread(ThreadGroup t,
String threadName)
This constructor simply assigns the given id.
|
Modifier and Type | Method and Description |
---|---|
void |
cleanup() |
protected void |
debugPrint(String message) |
void |
doWork()
This method is defined by all slave threads to implement
one iteration of work.
|
void |
finish()
This causes the threads run method to exit.
|
void |
initialize()
This initializes this thread.
|
void |
run() |
void |
runMonitor(int action,
long referenceTime,
Object[] args) |
void |
shutdown() |
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
protected static final boolean debugFlag
protected static final int WORK_THREAD
protected static final int UPDATE_THREAD
protected static final int WAIT
protected static final int NOTIFY_AND_WAIT
protected static final int RUN
protected static final int STOP
protected boolean active
protected boolean running
protected boolean started
protected long referenceTime
protected long lastWaitTimestamp
protected int type
protected int classification
protected Object[] args
protected boolean userStop
protected boolean waiting
protected static int numInstances
protected int instanceNum
public AudioEngineThread(ThreadGroup t, String threadName)
protected void debugPrint(String message)
public void doWork()
public void initialize()
public void finish()
public void runMonitor(int action, long referenceTime, Object[] args)
public void shutdown()
public void cleanup()
Copyright © 2016–2022 SciJava. All rights reserved.