|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.OutputStream java.io.FilterOutputStream com.softsynth.jsyn.util.StreamRecorder
public class StreamRecorder
Record audio data to a Java Output stream. This class uses an audio SampleWriter and a SampleQueueInputStream to collect the data. A thread periodically grabs data and writes it to the stream.
SampleQueueInputStream
Field Summary | |
---|---|
SynthInput |
input
Connect your audio output to this input. |
Constructor Summary | |
---|---|
StreamRecorder(java.io.OutputStream outStream,
int framesPerBuffer,
int numBuffers,
int channelsPerFrame)
|
|
StreamRecorder(SynthContext synthContext,
java.io.OutputStream outStream,
int framesPerBuffer,
int numBuffers,
int channelsPerFrame)
Create a recorder that will write an input signal to the outStream. |
Method Summary | |
---|---|
boolean |
getLittleEndianness()
|
boolean |
isLittleEndian()
|
void |
run()
|
void |
setLittleEndianness(boolean isLittleEndian)
Set endianness of the byte stream. |
void |
start(int time)
Start recording to the outStream. |
void |
stop(int time)
Stop the recording thread. |
void |
transfer()
|
Methods inherited from class java.io.FilterOutputStream |
---|
close, flush, write, write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public SynthInput input
Constructor Detail |
---|
public StreamRecorder(java.io.OutputStream outStream, int framesPerBuffer, int numBuffers, int channelsPerFrame)
public StreamRecorder(SynthContext synthContext, java.io.OutputStream outStream, int framesPerBuffer, int numBuffers, int channelsPerFrame)
framesPerBuffer
- Number of audio frames in a block to be written to outStream.numBuffers
- Number of buffers to use. Should be at least 2.channelsPerFrame
- is 1 for mono, 2 for stereoMethod Detail |
---|
public void setLittleEndianness(boolean isLittleEndian)
public boolean getLittleEndianness()
public boolean isLittleEndian()
public void transfer() throws java.io.IOException
java.io.IOException
public void run()
run
in interface java.lang.Runnable
public void start(int time)
public void stop(int time)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |