public class AudioStreamReader extends java.lang.Object implements AudioInputStream
Constructor and Description |
---|
AudioStreamReader(Synthesizer synth,
int samplesPerFrame) |
Modifier and Type | Method and Description |
---|---|
int |
available()
How many values are available to read without blocking?
|
void |
close() |
UnitInputPort |
getInput() |
double |
read() |
int |
read(double[] buffer)
Try to fill the entire buffer.
|
int |
read(double[] buffer,
int start,
int count)
Read from the stream.
|
public AudioStreamReader(Synthesizer synth, int samplesPerFrame)
public UnitInputPort getInput()
public int available()
available
in interface AudioInputStream
public void close()
close
in interface AudioInputStream
public double read()
read
in interface AudioInputStream
public int read(double[] buffer)
AudioInputStream
read
in interface AudioInputStream
public int read(double[] buffer, int start, int count)
AudioInputStream
read
in interface AudioInputStream
start
- index of first sample in buffercount
- number of samples to read, for example count=8 for 4 stereo frames