This commit is contained in:
2025-03-23 09:45:30 +01:00
parent fc303e7d48
commit ffe9a806f0
3 changed files with 53 additions and 2 deletions
+14 -1
View File
@@ -14,4 +14,17 @@ typedef struct
void init_preemphasis(ResistorCapacitor *filter, float tau, float sample_rate);
float apply_preemphasis(ResistorCapacitor *filter, float sample);
float hard_clip(float sample, float threshold);
float hard_clip(float sample, float threshold);
typedef struct {
float phase;
float freq;
float ref_freq;
float loop_filter_state;
float kp;
float ki;
int sample_rate;
int quadrature_mode;
} PLL;
void init_pll(PLL *pll, float output_freq, float refrence_freq, float loop_filter_bandwidth, int quadrature_mode, int sample_rate);
float apply_pll(PLL *pll, float ref_sample, float input_sample);