mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-27 03:23:54 +01:00
add delay
This commit is contained in:
@@ -20,4 +20,18 @@ typedef struct {
|
||||
} LowPassFilter;
|
||||
|
||||
void init_low_pass_filter(LowPassFilter *lp, float cutoff_frequency, float sample_rate);
|
||||
float apply_low_pass_filter(LowPassFilter *lp, float sample);
|
||||
float apply_low_pass_filter(LowPassFilter *lp, float sample);
|
||||
|
||||
|
||||
typedef struct {
|
||||
float *buffer;
|
||||
int write_idx; // Write position
|
||||
int read_idx; // Read position
|
||||
int size; // Total buffer size
|
||||
int delay; // Delay in samples
|
||||
} DelayLine;
|
||||
|
||||
void init_delay_line(DelayLine *delay_line, int max_delay);
|
||||
void set_delay_line(DelayLine *delay_line, int new_delay);
|
||||
float delay_line(DelayLine *delay_line, float in);
|
||||
void exit_delay_line(DelayLine *delay_line);
|
||||
Reference in New Issue
Block a user