blob: fbe71050c00f9e9312e2bcc9b69a58bf35d054ca [file] [log] [blame] [raw]
#pragma once
class Filter
{
public:
Filter(unsigned int cutoffFrq, unsigned int inputFrq, unsigned int order);
virtual ~Filter();
void setCutoffFrq(double fc);
void setFilterOrder(unsigned int order);
void reCalcWindowTable();
short lowPass(short from);
protected:
int order_;
int *windowTable_;
int *sampleHistory_;
unsigned int sampleBufPtr_;
unsigned int sampleBufMask_;
double fc_;
unsigned int sampleFrq_;
const unsigned int precision_;
};