edu.gtts.sautrela.audio
Class AudioRecorder
java.lang.Object
edu.gtts.sautrela.engine.AbstractDataProcessor
edu.gtts.sautrela.audio.AudioRecorder
- All Implemented Interfaces:
- DataProcessor, java.beans.BeanInfo, java.io.Serializable
public class AudioRecorder
- extends AbstractDataProcessor
- See Also:
- Serialized Form
| Fields inherited from interface java.beans.BeanInfo |
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
AudioRecorder
public AudioRecorder()
- Creates a new AudioRecorder
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 Bufferout - 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