light changes

This commit is contained in:
2025-01-23 10:03:39 +01:00
parent 43521d90a8
commit 7096a6e572
13 changed files with 106 additions and 300 deletions
+2 -5
View File
@@ -5,21 +5,18 @@
#include <stdlib.h>
#include "constants.h"
#define FIR_PHASES 32
#define FIR_TAPS 32
typedef struct {
float alpha;
float prev_sample;
} ResistorCapacitor;
void init_rc(ResistorCapacitor *pe, float tau, float sample_rate);
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_low_pass_filter(ResistorCapacitor *lp, float cutoff_frequency, float sample_rate);
float apply_low_pass_filter(ResistorCapacitor *lp, float sample);
typedef struct {
float *buffer;
int write_idx; // Write position