|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsampled.Synthesizer
public abstract class Synthesizer
Use the Synthesizer to generate synthetic audio data for test usage. Extending classes need to implement the synthesize method, utilizing the protected member samples indicating the number of samples passed since init.
Field Summary | |
---|---|
static int |
DEFAULT_SAMPLE_RATE
|
Constructor Summary | |
---|---|
Synthesizer()
|
Method Summary | |
---|---|
boolean |
getPreEmphasis()
Does the AudioSource perform pre-emphasis? |
int |
getSampleRate()
Get the frame rate |
int |
getSleepTime()
|
boolean |
isBlockingSource()
|
static void |
main(java.lang.String[] args)
|
int |
read(double[] buf)
This function handles the memory i/o and length of the stream (if applicable). |
void |
setBlocking(boolean blocking)
|
void |
setPreEmphasis(boolean applyPreEmphasis,
double a)
Toggle the pre-emphasis of the audio signal |
void |
setSleepTime(int sleep)
|
abstract java.lang.String |
toString()
String representation of the actual synthesizer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface sampled.AudioSource |
---|
tearDown |
Field Detail |
---|
public static int DEFAULT_SAMPLE_RATE
Constructor Detail |
---|
public Synthesizer()
Method Detail |
---|
public boolean getPreEmphasis()
AudioSource
getPreEmphasis
in interface AudioSource
public int getSampleRate()
AudioSource
getSampleRate
in interface AudioSource
public int getSleepTime()
public boolean isBlockingSource()
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException
public int read(double[] buf) throws java.io.IOException
read
in interface AudioSource
buf
- Previously allocated buffer to store the read audio samples.
java.io.IOException
synthesize
public void setBlocking(boolean blocking)
public void setPreEmphasis(boolean applyPreEmphasis, double a)
AudioSource
setPreEmphasis
in interface AudioSource
applyPreEmphasis
- apply pre-emphasis?a
- the pre-emphasis factor: x'(n) = x(n) - a*x(n-1)public void setSleepTime(int sleep)
public abstract java.lang.String toString()
toString
in interface AudioSource
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |