public static class MultirateFilters.Resampler extends Object implements StatefulMapFunction<float[]>
| Constructor and Description |
|---|
Resampler(double[] coefficients,
int upFactor,
int downFactor)
Creates a resampler using a FIR filter based on the given coefficients and the given up- and down-sample
factors.
|
Resampler(Filters.FIRFilter filter,
int upFactor,
int downFactor)
Creates a resampler using a FIR low pass filter and the given up- and down-sample
factors.
|
Resampler(int upFactor,
int downFactor)
Creates a resampler using a simple fir1 16th order low pass filter and the given up- and down-sample
factors.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDownFactor()
Down-sampling factor.
|
float |
getFactor()
Resampling factor.
|
int |
getUpFactor()
Up-sampling factor.
|
float[] |
map(float[] data)
Maps an object (usually an array, an
RealAudioBuffer
or a List) to another one of the same size. |
void |
reset()
Resets the function's state.
|
String |
toString() |
public Resampler(int upFactor,
int downFactor)
upFactor - upsample factordownFactor - downsample factorIllegalArgumentException - if a filter for the factor max(upFactor,downFactor) is not supportedFilters.createFir1_16thOrderLowpass(int)public Resampler(double[] coefficients,
int upFactor,
int downFactor)
coefficients - FIR filter coefficientsupFactor - upsample factordownFactor - downsample factorpublic Resampler(Filters.FIRFilter filter, int upFactor, int downFactor)
filter - FIR filterupFactor - upsample factordownFactor - downsample factorpublic void reset()
StatefulMapFunctionreset in interface StatefulMapFunction<float[]>public int getUpFactor()
public int getDownFactor()
public float getFactor()
public float[] map(float[] data)
MapFunctionRealAudioBuffer
or a List) to another one of the same size.map in interface MapFunction<float[]>data - dataCopyright © 2011–2020 tagtraum industries incorporated. All rights reserved.