0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-27 03:23:54 +01:00

some lpf changes

This commit is contained in:
2025-03-27 18:53:49 +01:00
parent a9b53484b3
commit 3b1941038e
3 changed files with 21 additions and 21 deletions

View File

@@ -5,7 +5,7 @@
#include "constants.h"
#include "oscillator.h"
#define FIR_ORDER 5
#define LPF_ORDER 5
typedef struct
{
@@ -21,12 +21,12 @@ float hard_clip(float sample, float threshold);
typedef struct
{
float A[FIR_ORDER];
float d1[FIR_ORDER];
float d2[FIR_ORDER];
float w0[FIR_ORDER];
float w1[FIR_ORDER];
float w2[FIR_ORDER];
} FIR;
void init_lpf(FIR *filter, float cutoff, int sample_rate);
float process_lpf(FIR *filter, float x);
float A[LPF_ORDER];
float d1[LPF_ORDER];
float d2[LPF_ORDER];
float w0[LPF_ORDER];
float w1[LPF_ORDER];
float w2[LPF_ORDER];
} LPFFilter;
void init_lpf(LPFFilter *filter, float cutoff, int sample_rate);
float process_lpf(LPFFilter *filter, float x);