public class Resampler extends Object
Constructor and Description |
---|
Resampler(double[] coefficients,
Rational factor)
Creates a resampler using a FIR filter based on the given coefficients and the given up- and down-sample
factors.
|
Resampler(FIRFilter filter,
Rational factor)
Creates a resampler using a FIR low pass filter and the given up- and down-sample
factors.
|
Resampler(Rational factor)
Creates a resampler using a simple fir1 29th order (=30taps) low pass filter and the given up- and down-sample
factors.
|
Modifier and Type | Method and Description |
---|---|
Rational |
getFactor()
Resampling factor.
|
int |
resample(double[] in,
double[] out,
int channel,
int channelCount) |
int |
resample(float[] in,
float[] out,
int channel,
int channelCount) |
int |
resample(int[] in,
int[] out,
int channel,
int channelCount) |
String |
toString() |
public Resampler(Rational factor)
factor
- resample factorIllegalArgumentException
- if a filter for the factor max(upFactor,downFactor)
is not supportedFIRFilter
public Resampler(double[] coefficients, Rational factor)
coefficients
- FIR filter coefficientsfactor
- resample factorpublic Resampler(FIRFilter filter, Rational factor)
filter
- FIR filterfactor
- resample factorpublic Rational getFactor()
public int resample(int[] in, int[] out, int channel, int channelCount)
public int resample(float[] in, float[] out, int channel, int channelCount)
public int resample(double[] in, double[] out, int channel, int channelCount)
Copyright © 2011–2018 tagtraum industries incorporated. All rights reserved.