public class Upsample extends AbstractSignalProcessor<AudioBuffer,AudioBuffer>
Filters
and Mapping) to avoid aliasing.lastOut, signalProcessorSupport| Constructor and Description |
|---|
Upsample()
Creates an upsample processor that adds a zero for each sample.
|
Upsample(int factor)
Creates an upsample processor with the given upsampling factor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getFactor() |
int |
hashCode() |
protected AudioBuffer |
processNext(AudioBuffer buffer)
Processes the given input and returns some output.
|
void |
setFactor(int factor)
Add zeroes for every sample so that the sample rate is
x-times higher
than before. |
String |
toString() |
connectTo, connectTo, connectTo, disconnectFrom, flush, getConnectedProcessors, getConnectedSource, getId, getOutput, process, read, reset, setIdpublic Upsample(int factor)
factor - number of added zeros plus one (upsampling factor)public Upsample()
public int getFactor()
setFactor(int)public void setFactor(int factor)
x-times higher
than before.
So if you specify 2, 1 zero will be added for every sample, effectively doubling the sample rate.
If you specify 3, the number of samples (and thus also the samplerate) triples - for each
sample two zeros are added.factor - upsampling factorprotected AudioBuffer processNext(AudioBuffer buffer)
AbstractSignalProcessorprocessNext in class AbstractSignalProcessor<AudioBuffer,AudioBuffer>buffer - input guaranteed not to be null.Copyright © 2011–2020 tagtraum industries incorporated. All rights reserved.