sound.recorder
Class AudioToFile

java.lang.Object
  extended by sound.recorder.AudioToFile

public class AudioToFile
extends java.lang.Object

AudioRecorder Recording to an audio file (advanced version)

Purpose This program opens two lines: one for recording and one for playback. In an infinite loop, it reads data from the recording line and writes them to the playback line. You can use this to measure the delays inside Java Sound: Speak into the microphone and wait untill you hear yourself in the speakers. This can be used to experience the effect of changing the buffer sizes: use the '-e' and '-i' options. You will notice that the delays change, too.


Constructor Summary
AudioToFile()
           
 
Method Summary
static Recorder getRecorder()
           
static Recorder getRecorder(java.io.File outputFile)
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AudioToFile

public AudioToFile()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws javax.sound.sampled.LineUnavailableException
Throws:
javax.sound.sampled.LineUnavailableException

getRecorder

public static Recorder getRecorder()
                            throws javax.sound.sampled.LineUnavailableException
Throws:
javax.sound.sampled.LineUnavailableException

getRecorder

public static Recorder getRecorder(java.io.File outputFile)
                            throws javax.sound.sampled.LineUnavailableException
Throws:
javax.sound.sampled.LineUnavailableException