Package com.sun.j3d.audioengines
Class AudioEngineThread
java.lang.Object
java.lang.Thread
com.sun.j3d.audioengines.AudioEngineThread
- All Implemented Interfaces:
Runnable
The Thread Class extended for Audio Device engines that must process
calls dynamically, in 'real-time" to asynchronously change engine
parameters.
NOTE: this class is probably not needed for those Audio Device implementations that handle all dynamic parameters in the low-level audio library.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
This indicates that this thread has been activated by MCprotected Object[]
The arguments passed in for this threadprotected int
The classification of this thread.protected static final boolean
protected int
protected long
Use to assign threadOpts WAIT_ALL_THREADSprotected static final int
This runMonitor action notifies MasterControl that this thread has completed and wait.protected static int
Some variables used to name threads correctlyprotected long
The time values passed into this threadprotected static final int
This runMonitor action tells the thread to run N number of iterations.protected boolean
This indicates that this thread is alive and runningprotected boolean
This indicates that this thread is readyprotected static final int
This runMonitor action tells the thread to stop runningprotected int
The type of this thread.protected static final int
protected boolean
Flag to indicate that user initiate a thread stopprotected static final int
This runMonitor action puts the thread into an initial wait stateprotected boolean
Flag to indicate that this thread is waiting to be notifyprotected static final int
The classification types.Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionAudioEngineThread
(ThreadGroup t, String threadName) This constructor simply assigns the given id. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
This initializes this thread.void
run()
void
runMonitor
(int action, long referenceTime, Object[] args) void
shutdown()
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
debugFlag
protected static final boolean debugFlag- See Also:
-
WORK_THREAD
protected static final int WORK_THREADThe classification types.- See Also:
-
UPDATE_THREAD
protected static final int UPDATE_THREAD- See Also:
-
WAIT
protected static final int WAITThis runMonitor action puts the thread into an initial wait state- See Also:
-
NOTIFY_AND_WAIT
protected static final int NOTIFY_AND_WAITThis runMonitor action notifies MasterControl that this thread has completed and wait.- See Also:
-
RUN
protected static final int RUNThis runMonitor action tells the thread to run N number of iterations.- See Also:
-
STOP
protected static final int STOPThis runMonitor action tells the thread to stop running- See Also:
-
active
protected boolean activeThis indicates that this thread has been activated by MC -
running
protected boolean runningThis indicates that this thread is alive and running -
started
protected boolean startedThis indicates that this thread is ready -
referenceTime
protected long referenceTimeThe time values passed into this thread -
lastWaitTimestamp
protected long lastWaitTimestampUse to assign threadOpts WAIT_ALL_THREADS -
type
protected int typeThe type of this thread. It is one of the above constants. -
classification
protected int classificationThe classification of this thread. It is one of the above constants. -
args
The arguments passed in for this thread -
userStop
protected boolean userStopFlag to indicate that user initiate a thread stop -
waiting
protected boolean waitingFlag to indicate that this thread is waiting to be notify -
numInstances
protected static int numInstancesSome variables used to name threads correctly -
instanceNum
protected int instanceNum
-
-
Constructor Details
-
AudioEngineThread
This constructor simply assigns the given id.
-
-
Method Details
-
debugPrint
-
doWork
public void doWork()This method is defined by all slave threads to implement one iteration of work. -
initialize
public void initialize()This initializes this thread. Once this method returns, the thread is ready to do work. -
finish
public void finish()This causes the threads run method to exit. -
run
public void run() -
runMonitor
-
shutdown
public void shutdown() -
cleanup
public void cleanup()
-