0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 19:23:51 +01:00
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

View File

@@ -417,6 +417,9 @@ int main(int argc, char **argv) {
ResistorCapacitor preemp_l, preemp_r;
init_preemphasis(&preemp_l, preemphasis_tau, sample_rate);
init_preemphasis(&preemp_r, preemphasis_tau, sample_rate);
PLL rds2_pll;
init_pll(&rds2_pll, 66500, 19000, 100, 1, sample_rate);
// #endregion
signal(SIGINT, stop);
@@ -495,7 +498,7 @@ int main(int argc, char **argv) {
float rds_carrier = get_oscillator_sin_multiplier_ni(&osc, 3);
output[i] += (current_rds_in*rds_carrier)*RDS_VOLUME;
if(!sca_on) {
float rds2_carrier_66 = get_oscillator_cos_sample(&rds2_osc);
float rds2_carrier_66 = apply_pll(&rds2_pll, get_oscillator_sin_multiplier_ni(&osc, 1), get_oscillator_cos_sample(&rds2_osc));
output[i] += (current_rds2_in*rds2_carrier_66)*RDS2_VOLUME;
}
}