public abstract class SampleBuffer extends AbstractFilter
Modifier and Type | Field and Description |
---|---|
(package private) int |
actualSize |
(package private) int |
bufferSize |
(package private) int |
currentPos |
(package private) float[] |
sampleBuffer |
sampleSize, source
Constructor and Description |
---|
SampleBuffer(SampleProvider source,
int bufferSize) |
Modifier and Type | Method and Description |
---|---|
void |
fetchSample(float[] sample,
int off)
Fetches a sample from a sensors or filter.
|
protected int |
getActualSize() |
int |
getBufferSize() |
protected void |
getOldest(float[] sample,
int off) |
private void |
reset()
Empties the sample buffer
|
(package private) int |
toPos(int i,
int index) |
sampleSize
int bufferSize
int actualSize
int currentPos
float[] sampleBuffer
public SampleBuffer(SampleProvider source, int bufferSize)
public int getBufferSize()
private void reset()
int toPos(int i, int index)
public void fetchSample(float[] sample, int off)
SampleProvider
fetchSample
in interface SampleProvider
fetchSample
in class AbstractFilter
sample
- The array to store the sample in.off
- The elements of the sample are stored in the array starting at the offset position.protected void getOldest(float[] sample, int off)
protected int getActualSize()