mirror of
https://github.com/damp11113/EasyMPX.git
synced 2025-04-28 06:58:10 +00:00
19 lines
416 B
C++
19 lines
416 B
C++
#ifndef PAFILTERFUNC_H
|
|
#define M_PI 3.14159265358979323846
|
|
#include <vector>
|
|
|
|
class LowPassFilter {
|
|
public:
|
|
LowPassFilter(double sampleRate, double cutoffFreq, int order);
|
|
void apply(float* buffer, int bufferSize);
|
|
|
|
private:
|
|
std::vector<double> calculateCoefficients(double sampleRate, double cutoffFreq, int order);
|
|
|
|
std::vector<double> coefficients;
|
|
std::vector<double> delayLine;
|
|
};
|
|
|
|
|
|
#endif
|