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

generate the 66.5 inside the pll via the pilot

This commit is contained in:
2025-03-23 16:28:22 +01:00
parent a654700eba
commit 228cb355ac
10 changed files with 1056 additions and 1053 deletions

View File

@@ -7,8 +7,8 @@
typedef struct
{
float alpha;
float prev_sample;
float alpha;
float prev_sample;
} ResistorCapacitor;
void init_preemphasis(ResistorCapacitor *filter, float tau, float sample_rate);
@@ -17,14 +17,16 @@ float apply_preemphasis(ResistorCapacitor *filter, float sample);
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;
float phase;
float freq;
float loop_filter_state;
float kp;
float ki;
float last_output;
int interpolation;
int decimation;
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);
void init_pll(PLL *pll, int interpolation, int decimation, float freq, float loop_filter_bandwidth, int quadrature_mode, int sample_rate);
float apply_pll(PLL *pll, float ref_sample);