jAudioFeatureExtractor
クラス ExtractionThread

java.lang.Object
  上位を拡張 java.lang.Thread
      上位を拡張 jAudioFeatureExtractor.ExtractionThread
すべての実装されたインタフェース:
Updater, java.lang.Runnable

public class ExtractionThread
extends java.lang.Thread
implements Updater

This is a thread for executing the DataModel.extractFeatures without tying up the swing dispatch thread.

作成者:
Daniel McEnnis

入れ子のクラスの概要
 
クラス java.lang.Thread から継承された入れ子のクラス/インタフェース
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
フィールドの概要
 
クラス java.lang.Thread から継承されたフィールド
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
コンストラクタの概要
ExtractionThread(Controller c, OuterFrame of)
          This constructor constructs the thread, partially preparing it for execution
 
メソッドの概要
 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
 
クラス 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
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

ExtractionThread

public ExtractionThread(Controller c,
                        OuterFrame of)
This constructor constructs the thread, partially preparing it for execution

パラメータ:
c - Near global container for numerous controller and model objects
of - Link to outerframe of the gui. Used to disable the main frame to prevent race conditions in the feature settings.
メソッドの詳細

setup

public 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

パラメータ:
perFile - Should features be extracted over the entire file
perWindow - Should features be extracted on a window by window basis
valuesSavePath - File to save extracted features
definitionSavePath - File to save descriptions of the features extracted
windowSize - Size of the analysis window in samples
windowOverlap - Percent of the window that is duplicated between analysis windows

run

public void run()
Execute the thread, suspending the main frame, extracting the features, then enabling the main frame.

定義:
インタフェース java.lang.Runnable 内の run
オーバーライド:
クラス java.lang.Thread 内の run

announceUpdate

public void announceUpdate(int fileNumber,
                           int fileDone)
This is part of the Updater interface. It notifies the gui that a file has been completed.

定義:
インタフェース Updater 内の announceUpdate
パラメータ:
fileNumber - How many files are completed.
fileDone - Position in the file (usually 0).

announceUpdate

public void announceUpdate(int fileDone)
This is part of the Updater interface. It notifies the gui of an increase in the amount of the file processed.

定義:
インタフェース Updater 内の announceUpdate
パラメータ:
fileDone - Position in file.

setNumberOfFiles

public void setNumberOfFiles(int files)
This is part of the Updater interface. It is used to set the total number of files to be processed.

定義:
インタフェース Updater 内の setNumberOfFiles
パラメータ:
files - Number of files to be processed.

setFileLength

public void setFileLength(int window)
This is part of the Updater interface. It is used to notify the gui of the total size of the file (in windows of data).

定義:
インタフェース Updater 内の setFileLength
パラメータ:
window - Total number of windows of data to be processed.

hasRun

public boolean hasRun()
Used to prevent this thread from executing twice.

戻り値:
whether or not this thread has run before