marytts.util.data.audio
Class AudioRecorder.AbstractRecorder

java.lang.Object
  extended by java.lang.Thread
      extended by marytts.util.data.audio.AudioRecorder.AbstractRecorder
All Implemented Interfaces:
java.lang.Runnable, AudioRecorder.Recorder
Direct Known Subclasses:
AudioRecorder.BufferingRecorder, AudioRecorder.DirectRecorder
Enclosing class:
AudioRecorder

public static class AudioRecorder.AbstractRecorder
extends java.lang.Thread
implements AudioRecorder.Recorder


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  AudioProcessor audioProcessor
           
protected  boolean m_bRecording
           
protected  java.io.File m_file
           
protected  javax.sound.sampled.TargetDataLine m_line
           
protected  javax.sound.sampled.AudioFileFormat.Type m_targetType
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AudioRecorder.AbstractRecorder(javax.sound.sampled.TargetDataLine line, javax.sound.sampled.AudioFileFormat.Type targetType, java.io.File file)
           
 
Method Summary
 void setAudioProcessor(AudioProcessor proc)
          Optionally, set an audio processor to apply to the recording before saving it.
 void start()
          Starts the recording.
 void stopRecording()
           
 void stopRecordingNOW()
           
 
Methods inherited from class java.lang.Thread
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_line

protected javax.sound.sampled.TargetDataLine m_line

m_targetType

protected javax.sound.sampled.AudioFileFormat.Type m_targetType

m_file

protected java.io.File m_file

m_bRecording

protected boolean m_bRecording

audioProcessor

protected AudioProcessor audioProcessor
Constructor Detail

AudioRecorder.AbstractRecorder

public AudioRecorder.AbstractRecorder(javax.sound.sampled.TargetDataLine line,
                                      javax.sound.sampled.AudioFileFormat.Type targetType,
                                      java.io.File file)
Method Detail

setAudioProcessor

public void setAudioProcessor(AudioProcessor proc)
Optionally, set an audio processor to apply to the recording before saving it.

Specified by:
setAudioProcessor in interface AudioRecorder.Recorder
Parameters:
proc -

start

public void start()
Starts the recording. To accomplish this, (i) the line is started and (ii) the thread is started.

Specified by:
start in interface AudioRecorder.Recorder
Overrides:
start in class java.lang.Thread

stopRecording

public void stopRecording()
Specified by:
stopRecording in interface AudioRecorder.Recorder

stopRecordingNOW

public void stopRecordingNOW()