0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 19:23:51 +01:00

change lpf

This commit is contained in:
2025-03-08 19:41:22 +01:00
parent b1c9e28844
commit 5de87c15a3
4 changed files with 42 additions and 83 deletions

View File

@@ -15,10 +15,10 @@ void init_preemphasis(ResistorCapacitor *filter, float tau, float sample_rate);
float apply_preemphasis(ResistorCapacitor *filter, float sample);
typedef struct {
float b0, b1, b2;
float a1, a2;
float x1, x2;
float y1, y2;
// https://www.earlevel.com/main/2012/11/26/biquad-c-source-code/
float a0, a1, a2;
float b0, b1;
float z1, z2;
} BiquadFilter;
void init_lpf(BiquadFilter* filter, float cutoffFreq, float qFactor, float sampleRate);
void init_hpf(BiquadFilter* filter, float cutoffFreq, float qFactor, float sampleRate);