MeanFilter

Simple FIR to smooth things cheaply. Introduces (samples - 1) / 2 latency. Converts everything to long for stability purpose. So this may run forever as long as the input is below some threshold.

Members

Functions

initialize
void initialize(T initialValue, int samples, T maxExpectedValue)

Initialize mean filter with given number of samples.

initialize
void initialize(T initialValue, double cutoffHz, double samplerate, T maxExpectedValue)

Initialize with with cutoff frequency and samplerate.

nextBuffer
void nextBuffer(const(T)* input, T* output, int frames)
Undocumented in source. Be warned that the author may not have intended to support it.
nextSample
T nextSample(T x)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta