2021-07-27 09:47:15 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
class FixedBiquad {
|
|
|
|
public:
|
|
|
|
FixedBiquad();
|
|
|
|
|
|
|
|
float ProcessSample(float sample);
|
2022-08-23 00:26:44 +02:00
|
|
|
|
2021-07-27 09:47:15 +02:00
|
|
|
void Reset();
|
2022-08-23 00:26:44 +02:00
|
|
|
|
2021-07-27 09:47:15 +02:00
|
|
|
void SetCoeffs(float a0, float a1, float a2, float b0, float b1, float b2);
|
2022-08-23 00:26:44 +02:00
|
|
|
|
2021-07-27 09:47:15 +02:00
|
|
|
void SetBandPassParameter(float frequency, uint32_t samplerate, float qFactor);
|
2022-08-23 00:26:44 +02:00
|
|
|
|
2021-07-27 09:47:15 +02:00
|
|
|
void SetHighPassParameter(float frequency, uint32_t samplerate, float param_4, float qFactor, float param_6);
|
2022-08-23 00:26:44 +02:00
|
|
|
|
2021-07-27 09:47:15 +02:00
|
|
|
void SetLowPassParameter(float frequency, uint32_t samplerate, float qFactor);
|
|
|
|
|
|
|
|
|
|
|
|
float y_2, y_1, x_2, x_1;
|
|
|
|
float b0, b1, b2, a1, a2;
|
|
|
|
};
|