|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jsyn.io.AudioFifo
public class AudioFifo
FIFO that implements AudioInputStream, AudioOutputStream interfaces. This can be used to send audio data between different threads. The reads or writes may or may not wait based on flags.
Constructor Summary | |
---|---|
AudioFifo()
|
Method Summary | |
---|---|
void |
allocate(int size)
|
int |
available()
How many samples are available for reading without blocking? |
void |
close()
|
static boolean |
isPowerOfTwo(int size)
|
boolean |
isReadWaitEnabled()
|
boolean |
isWriteWaitEnabled()
|
double |
read()
|
int |
read(double[] buffer)
|
int |
read(double[] buffer,
int start,
int count)
|
void |
setReadWaitEnabled(boolean enabled)
If true then a subsequent read call will wait if there is no data to read. |
void |
setWriteWaitEnabled(boolean enabled)
If true then a subsequent write call will wait if there is no room to write. |
int |
size()
|
void |
write(double value)
|
void |
write(double[] buffer)
|
void |
write(double[] buffer,
int start,
int count)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AudioFifo()
Method Detail |
---|
public void allocate(int size)
public int size()
public static boolean isPowerOfTwo(int size)
public int available()
available
in interface AudioInputStream
public void close()
close
in interface AudioInputStream
close
in interface AudioOutputStream
public double read()
read
in interface AudioInputStream
public void write(double value)
write
in interface AudioOutputStream
public int read(double[] buffer)
read
in interface AudioInputStream
public int read(double[] buffer, int start, int count)
read
in interface AudioInputStream
public void write(double[] buffer)
write
in interface AudioOutputStream
public void write(double[] buffer, int start, int count)
write
in interface AudioOutputStream
public void setWriteWaitEnabled(boolean enabled)
public void setReadWaitEnabled(boolean enabled)
public boolean isWriteWaitEnabled()
public boolean isReadWaitEnabled()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |