Sautrela

edu.gtts.sautrela.audio
Class AudioRecorder

java.lang.Object
  extended by edu.gtts.sautrela.engine.AbstractDataProcessor
      extended by edu.gtts.sautrela.audio.AudioRecorder
All Implemented Interfaces:
DataProcessor, java.beans.BeanInfo, java.io.Serializable

public class AudioRecorder
extends AbstractDataProcessor

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Constructor Summary
AudioRecorder()
          Creates a new AudioRecorder
 
Method Summary
 void editBeanInfo(java.beans.BeanInfo info)
           
 void endRecording()
          Ends the recording, sending a CloseData object
 int getSampleRate()
           
 int getSampleSize()
           
static void main(java.lang.String[] args)
           
 void process(Buffer forgetMe, Buffer out)
          Reads audio data from the opened TargetDataLine.
 void setSampleRate(int sampleRate)
           
 void setSampleSize(int sampleSize)
           
 void startRecording()
          Starts the recording and the recorded signal is sended as a DataStream
 void stopRecording()
          Stops the recording and the DataStream ends
 
Methods inherited from class edu.gtts.sautrela.engine.AbstractDataProcessor
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, getName, getPropertyDescriptors, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AudioRecorder

public AudioRecorder()
Creates a new AudioRecorder

Method Detail

getSampleRate

public int getSampleRate()

setSampleRate

public void setSampleRate(int sampleRate)

getSampleSize

public int getSampleSize()

setSampleSize

public void setSampleSize(int sampleSize)

startRecording

public void startRecording()
Starts the recording and the recorded signal is sended as a DataStream


stopRecording

public void stopRecording()
Stops the recording and the DataStream ends


endRecording

public void endRecording()
Ends the recording, sending a CloseData object


process

public void process(Buffer forgetMe,
                    Buffer out)
             throws DataProcessorException
Reads audio data from the opened TargetDataLine. Each time the startRecording() and stopRecording() methods are invoked, a DataStream is generated. When endRecording() method is invoqued, a DataClose is sended.

Parameters:
forgetMe - Input Buffer
out - Output Buffer
Throws:
DataProcessorException

editBeanInfo

public void editBeanInfo(java.beans.BeanInfo info)
Overrides:
editBeanInfo in class AbstractDataProcessor

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception

Sautrela