public class Downsample extends AbstractSignalProcessor<AudioBuffer,AudioBuffer>
Filters
 and Mapping) to avoid aliasing.
 
 Date: Jul 22, 2010
 Time: 2:38:54 PMDecimatelastOut, signalProcessorSupport| Constructor and Description | 
|---|
Downsample()
Creates a downsample processor that drops/keeps every second frame. 
 | 
Downsample(int nthFrameToKeep)
Keeps every nth frame, drops all other frames. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
int | 
getNthFrameToKeep()  | 
int | 
hashCode()  | 
protected AudioBuffer | 
processNext(AudioBuffer buffer)
Processes the given input and returns some output. 
 | 
void | 
setNthFrameToKeep(int nthFrameToKeep)
Every  
nthFrameToKeepth frame will be kept. | 
String | 
toString()  | 
connectTo, connectTo, connectTo, disconnectFrom, flush, getConnectedProcessors, getConnectedSource, getId, getOutput, process, read, reset, setIdpublic Downsample(int nthFrameToKeep)
nthFrameToKeep - nth frame to keeppublic Downsample()
public int getNthFrameToKeep()
setNthFrameToKeep(int)public void setNthFrameToKeep(int nthFrameToKeep)
nthFrameToKeepth frame will be kept.
 So if you specify 2, every 2nd frame will be kept.
 If you specify 3, every third frame will be kept - leading to a sample rate reduction of,
 e.g. 44100 to 44100/3 = 14700.nthFrameToKeep - frame to keepprotected 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.