pragma once, maybe reduces size?

This commit is contained in:
2025-12-20 10:36:39 +01:00
parent eb0f11b962
commit d52a9678ec
11 changed files with 31 additions and 31 deletions
+3 -6
View File
@@ -29,9 +29,7 @@ void cleanup_rds_modulator(RDSModulator* rdsMod) {
}
float get_rds_sample(RDSModulator* rdsMod, uint8_t stream) {
if (stream >= rdsMod->num_streams) {
return 0.0f;
}
if (stream >= rdsMod->num_streams) return 0.0f;
rdsMod->data[stream].phase += 1187.5 / RDS_SAMPLE_RATE;
@@ -48,8 +46,7 @@ float get_rds_sample(RDSModulator* rdsMod, uint8_t stream) {
}
float sample = sinf(M_2PI * rdsMod->data[stream].phase + rdsMod->data[stream].symbol_shift);
if(rdsMod->data[stream].cur_output == 0) sample = -sample; // do bpsk
if(rdsMod->data[stream].cur_output == 0) sample = -sample; // do bpsk, if you comment this part out, nothing will be decoded
uint8_t tooutput = rdsMod->params.rdsgen > stream ? 1 : 0;
return sample*rdsMod->params.level*tooutput;
return sample*rdsMod->params.level*(rdsMod->params.rdsgen > stream ? 1 : 0);
}