Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface Encoder
Method Summary | |
int | |
int |
|
int |
|
int |
|
boolean |
|
int |
|
float[] |
|
int |
|
float[] |
|
int |
|
int |
|
float[] |
|
float |
|
int |
|
boolean |
|
boolean |
|
float |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
public int encode(Bits bits, float[] in)
Encode the given input signal.
- Parameters:
bits
- - Speex bits buffer.in
- - the raw mono audio frame to encode.
- Returns:
- 1 if successful.
public int getAbr()
Returns the Average Bit Rate used (0 if ABR is not turned on).
- Returns:
- the Average Bit Rate used (0 if ABR is not turned on).
public int getBitRate()
Get the current Bit Rate.
- Returns:
- the current Bit Rate.
public int getComplexity()
Returns the algorthmic complexity.
- Returns:
- the algorthmic complexity.
public boolean getDtx()
Returns whether or not we are using Discontinuous Transmission encoding.
- Returns:
- whether or not we are using Discontinuous Transmission encoding.
public int getEncodedFrameSize()
Returns the size in bits of an audio frame encoded with the current mode.
- Returns:
- the size in bits of an audio frame encoded with the current mode.
public float[] getExc()
Returns the excitation array.
- Returns:
- the excitation array.
public int getFrameSize()
Returns the size of a frame.
- Returns:
- the size of a frame.
public float[] getInnov()
Returns the innovation array.
- Returns:
- the innovation array.
public int getLookAhead()
Return LookAhead.
- Returns:
- LookAhead.
public int getMode()
Returns the encoding submode currently in use.
- Returns:
- the encoding submode currently in use.
public float[] getPiGain()
Returns the Pitch Gain array.
- Returns:
- the Pitch Gain array.
public float getRelativeQuality()
Returns the relative quality.
- Returns:
- the relative quality.
public int getSamplingRate()
Returns the sampling rate.
- Returns:
- the sampling rate.
public boolean getVad()
Returns whether or not we are using Voice Activity Detection encoding.
- Returns:
- whether or not we are using Voice Activity Detection encoding.
public boolean getVbr()
Returns whether or not we are using Variable Bit Rate encoding.
- Returns:
- whether or not we are using Variable Bit Rate encoding.
public float getVbrQuality()
Returns the Varible Bit Rate Quality.
- Returns:
- the Varible Bit Rate Quality.
public void setAbr(int abr)
Sets the Average Bit Rate.
- Parameters:
abr
- - the desired Average Bit Rate.
public void setBitRate(int bitrate)
Sets the bitrate.
- Parameters:
bitrate
-
public void setComplexity(int complexity)
Sets the algorithmic complexity.
- Parameters:
complexity
- - the desired algorithmic complexity (between 1 and 10 - default is 3).
public void setDtx(boolean dtx)
Sets whether or not to use Discontinuous Transmission encoding.
- Parameters:
dtx
-
public void setMode(int mode)
Sets the encoding submode.
- Parameters:
mode
-
public void setQuality(int quality)
Sets the Quality (between 0 and 10).
- Parameters:
quality
- - the desired Quality (between 0 and 10).
public void setSamplingRate(int rate)
Sets the sampling rate.
- Parameters:
rate
- - the sampling rate.
public void setVad(boolean vad)
Sets whether or not to use Voice Activity Detection encoding.
- Parameters:
vad
-
public void setVbr(boolean vbr)
Sets whether or not to use Variable Bit Rate encoding.
- Parameters:
vbr
-
public void setVbrQuality(float quality)
Sets the Varible Bit Rate Quality.
- Parameters:
quality
- - the desired Varible Bit Rate Quality.