|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object micromod.resamplers.FIRResampler
Table based multipoint FIR resampler. This took many, many hours to debug! Note to self: No more 12-hour sleep ins.
Field Summary | |
protected static int |
FIXED_POINT_BITMASK
|
protected static int |
FIXED_POINT_CONV
|
protected static int |
FIXED_POINT_ONE
|
protected static int |
FIXED_POINT_SHIFT
|
protected int |
points
|
protected short[] |
sinc
|
Constructor Summary | |
FIRResampler(int numPoints)
Constructor. |
Method Summary | |
protected void |
genSinc()
Generate one wing of a Blackman windowed sinc equation. |
int |
getCushionSize()
Return minimum number of samples required by the resampler before and after the audio to be processed. |
void |
resample(short[] inputBuf,
int samplePos,
int subSamplePos,
int step,
int subStep,
short[] outputBuf,
int position,
int length)
Do resampling. |
protected static void |
zero(short[] buffer,
int start,
int end)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int FIXED_POINT_SHIFT
protected static final int FIXED_POINT_ONE
protected static final int FIXED_POINT_BITMASK
protected static final int FIXED_POINT_CONV
protected int points
protected short[] sinc
Constructor Detail |
public FIRResampler(int numPoints)
numPoints
- The higher the better but more cpu and memory intensive. Even number, minimum 2.Method Detail |
public void resample(short[] inputBuf, int samplePos, int subSamplePos, int step, int subStep, short[] outputBuf, int position, int length)
resample
in interface Resampler
samplePos
- The index of the sample in inputBufsubSamplePos
- The fractional part of the index, in 16 bit fixed point.step
- The integer part of the number of input samples per output sample.subStep
- The fractional part of the number of input samples per output sample.
The value is in 16 bit fixed point.position
- The index of the output buffer to start writing to.length
- The number of samples of output to produce.public int getCushionSize()
Resampler
getCushionSize
in interface Resampler
protected void genSinc()
protected static void zero(short[] buffer, int start, int end)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |