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

add new preemp

This commit is contained in:
2025-01-31 16:48:13 +01:00
parent 0c9222393c
commit fa2ba7f71a
4 changed files with 57 additions and 24 deletions

View File

@@ -6,13 +6,14 @@
#include "constants.h"
typedef struct {
float alpha;
float prev_sample;
} ResistorCapacitor;
float b0, b1, b2;
float a1, a2;
float x1, x2;
float y1, y2;
} BiquadFilter;
void init_rc(ResistorCapacitor *pe, float alpha);
void init_rc_tau(ResistorCapacitor *pe, float tau, float sample_rate);
float apply_pre_emphasis(ResistorCapacitor *pe, float sample);
void init_preemphasis(BiquadFilter *filter, float tau, float sample_rate);
float apply_preemphasis(BiquadFilter *filter, float input);
typedef struct {
float coeffs[FILTER_TAPS];