|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AudioSource
Any audio source must support the basic operations: read samples, provide the sample rate (samples per seconds) and should be printable for debug purposes. It should also support pre-emphasis.
AudioFileReader.preEmphasize
Method Summary | |
---|---|
boolean |
getPreEmphasis()
Does the AudioSource perform pre-emphasis? |
int |
getSampleRate()
Get the frame rate |
int |
read(double[] buf)
Read buf.length samples from the AudioSource. |
void |
setPreEmphasis(boolean applyPreEmphasis,
double a)
Toggle the pre-emphasis of the audio signal |
void |
tearDown()
Tear down the AudioSource (i.e. |
java.lang.String |
toString()
Get a string representation of the source |
Method Detail |
---|
boolean getPreEmphasis()
int getSampleRate()
int read(double[] buf) throws java.io.IOException
buf
- Previously allocated buffer to store the read audio samples.
java.io.IOException
void setPreEmphasis(boolean applyPreEmphasis, double a)
applyPreEmphasis
- apply pre-emphasis?a
- the pre-emphasis factor: x'(n) = x(n) - a*x(n-1)void tearDown() throws java.io.IOException
java.io.IOException
java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |