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

remove lpf and add normalization to the preemp

This commit is contained in:
2025-03-26 19:26:40 +01:00
parent 6a83a18cf4
commit 2e36f34b4a
5 changed files with 9 additions and 30 deletions

View File

@@ -5,18 +5,14 @@
#include "constants.h"
#include "oscillator.h"
#define FILTER_LEN 51
typedef struct
{
float alpha;
float prev_sample;
float gain;
} ResistorCapacitor;
void init_preemphasis(ResistorCapacitor *filter, float tau, float sample_rate);
float apply_preemphasis(ResistorCapacitor *filter, float sample);
float hard_clip(float sample, float threshold);
void init_rc_lpf(ResistorCapacitor *filter, float cutoff, float sample_rate);
float apply_rc_lpf(ResistorCapacitor *filter, float sample);
float hard_clip(float sample, float threshold);