comirva.io
Class AudioFileLoaderThread

java.lang.Object
  extended by java.lang.Thread
      extended by comirva.io.AudioFileLoaderThread
All Implemented Interfaces:
Runnable

public class AudioFileLoaderThread
extends Thread

This class implements a thread for loading (uncompressed) audio data files.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AudioFileLoaderThread(File f)
          Creates a MatrixDataFileLoaderThread for loading a data matrix from File f.
AudioFileLoaderThread(File f, Vector ml)
          Creates a MatrixDataFileLoaderThread for loading a data matrix from File f.
AudioFileLoaderThread(File f, Vector ml, JLabel jl, DefaultListModel lm)
          Creates a MatrixDataFileLoaderThread for loading a data matrix from File f.
 
Method Summary
 DataMatrix getDataMatrix()
          Returns the DataMatrix-instance into which the audio file content is loaded.
 void run()
          This method is called when the thread is started.
 
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

AudioFileLoaderThread

public AudioFileLoaderThread(File f,
                             Vector ml,
                             JLabel jl,
                             DefaultListModel lm)
Creates a MatrixDataFileLoaderThread for loading a data matrix from File f.

Parameters:
f - the File which contains the matrix data (exported from Matlab)
ml - the Vector to which the name of the DataMatrix should be added after it has been loaded
jl - the JLabel representing the status bar (for writing current loading progress)
lm - the DefaultListModel to add the name of the matrix to the UI

AudioFileLoaderThread

public AudioFileLoaderThread(File f,
                             Vector ml)
Creates a MatrixDataFileLoaderThread for loading a data matrix from File f.

Parameters:
f - the File which contains the matrix data (exported from Matlab)
ml - the Vector to which the name of the DataMatrix should be added after it has been loaded

AudioFileLoaderThread

public AudioFileLoaderThread(File f)
Creates a MatrixDataFileLoaderThread for loading a data matrix from File f.

Parameters:
f - the File which contains the matrix data (exported from Matlab)
Method Detail

run

public void run()
This method is called when the thread is started. The audio file is opened, the data read and extracted.

Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Runnable.run()

getDataMatrix

public DataMatrix getDataMatrix()
Returns the DataMatrix-instance into which the audio file content is loaded.

Returns:
the DataMatrix containing the loaded matrix
See Also:
DataMatrix