sound.recorder
Class DirectRecordingStream

java.lang.Object
  extended by java.lang.Thread
      extended by sound.recorder.DirectRecordingStream
All Implemented Interfaces:
java.lang.Runnable

public class DirectRecordingStream
extends java.lang.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
DirectRecordingStream(javax.sound.sampled.AudioFormat audioFormat, javax.sound.sampled.AudioFileFormat.Type targetType, java.io.File file)
           
DirectRecordingStream(javax.sound.sampled.AudioFormat audioFormat, javax.sound.sampled.AudioFileFormat.Type targetType, java.io.OutputStream outputStream)
           
DirectRecordingStream(javax.sound.sampled.TargetDataLine line, javax.sound.sampled.AudioFileFormat.Type targetType, java.io.File file)
           
DirectRecordingStream(javax.sound.sampled.TargetDataLine line, javax.sound.sampled.AudioFileFormat.Type targetType, java.io.OutputStream outputStream)
           
 
Method Summary
static void main(java.lang.String[] args)
           
 void run()
           
 void start()
          Starts the recording.
 void stopRecording()
           
 
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, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectRecordingStream

public DirectRecordingStream(javax.sound.sampled.AudioFormat audioFormat,
                             javax.sound.sampled.AudioFileFormat.Type targetType,
                             java.io.OutputStream outputStream)
                      throws javax.sound.sampled.LineUnavailableException
Throws:
javax.sound.sampled.LineUnavailableException

DirectRecordingStream

public DirectRecordingStream(javax.sound.sampled.AudioFormat audioFormat,
                             javax.sound.sampled.AudioFileFormat.Type targetType,
                             java.io.File file)
                      throws javax.sound.sampled.LineUnavailableException
Throws:
javax.sound.sampled.LineUnavailableException

DirectRecordingStream

public DirectRecordingStream(javax.sound.sampled.TargetDataLine line,
                             javax.sound.sampled.AudioFileFormat.Type targetType,
                             java.io.OutputStream outputStream)

DirectRecordingStream

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

start

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

Overrides:
start in class java.lang.Thread

stopRecording

public void stopRecording()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

main

public static void main(java.lang.String[] args)