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

turn lpf and emphasis into a common rc

This commit is contained in:
2025-01-21 14:32:50 +01:00
parent 1fef2f7598
commit 3ac9d67e3d
12 changed files with 40 additions and 45 deletions

View File

@@ -11,18 +11,13 @@
typedef struct {
float alpha;
float prev_sample;
} Emphasis;
} ResistorCapacitor;
void init_emphasis(Emphasis *pe, float tau, float sample_rate);
float apply_pre_emphasis(Emphasis *pe, float sample);
void init_rc(ResistorCapacitor *pe, float tau, float sample_rate);
float apply_pre_emphasis(ResistorCapacitor *pe, float sample);
typedef struct {
float alpha;
float prev_sample;
} LowPassFilter;
void init_low_pass_filter(LowPassFilter *lp, float cutoff_frequency, float sample_rate);
float apply_low_pass_filter(LowPassFilter *lp, float sample);
void init_low_pass_filter(ResistorCapacitor *lp, float cutoff_frequency, float sample_rate);
float apply_low_pass_filter(ResistorCapacitor *lp, float sample);
typedef struct {