|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
jAudioFeatureExtractor.ExtractionThread
public class ExtractionThread
This is a thread for executing the DataModel.extractFeatures without tying up the swing dispatch thread.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ExtractionThread(Controller c,
OuterFrame of)
This constructor constructs the thread, partially preparing it for execution |
Method Summary | |
---|---|
void |
announceUpdate(int fileDone)
This is part of the Updater interface. |
void |
announceUpdate(int fileNumber,
int fileDone)
This is part of the Updater interface. |
boolean |
hasRun()
Used to prevent this thread from executing twice. |
void |
run()
Execute the thread, suspending the main frame, extracting the features, then enabling the main frame. |
void |
setFileLength(int window)
This is part of the Updater interface. |
void |
setNumberOfFiles(int files)
This is part of the Updater interface. |
void |
setup(boolean perFile,
boolean perWindow,
java.lang.String valuesSavePath,
java.lang.String definitionSavePath,
int windowSize,
double windowOverlap)
This is the method to finish preparing the thread for execution |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExtractionThread(Controller c, OuterFrame of)
c
- Near global container for numerous controller and model
objectsof
- Link to outerframe of the gui. Used to disable the main frame
to prevent race conditions in the feature settings.Method Detail |
---|
public void setup(boolean perFile, boolean perWindow, java.lang.String valuesSavePath, java.lang.String definitionSavePath, int windowSize, double windowOverlap)
perFile
- Should features be extracted over the entire fileperWindow
- Should features be extracted on a window by window basisvaluesSavePath
- File to save extracted featuresdefinitionSavePath
- File to save descriptions of the features extractedwindowSize
- Size of the analysis window in sampleswindowOverlap
- Percent of the window that is duplicated between analysis
windowspublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void announceUpdate(int fileNumber, int fileDone)
announceUpdate
in interface Updater
fileNumber
- How many files are completed.fileDone
- Position in the file (usually 0).public void announceUpdate(int fileDone)
announceUpdate
in interface Updater
fileDone
- Position in file.public void setNumberOfFiles(int files)
setNumberOfFiles
in interface Updater
files
- Number of files to be processed.public void setFileLength(int window)
setFileLength
in interface Updater
window
- Total number of windows of data to be processed.public boolean hasRun()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |