0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 11:22:00 +01:00
This commit is contained in:
2025-08-02 17:54:32 +02:00
parent e099e62949
commit bbcce3ff71

View File

@@ -444,7 +444,7 @@ void init_runtime(FM95_Runtime* runtime, FM95_Config config, bool rds_on) {
}
float last_gain = 0.0f;
if(runtime->bs412.sample_rate == config.sample_rate) last_gain = runtime->bs412.gain;
if((uint32_t)runtime->bs412.sample_rate == config.sample_rate) last_gain = runtime->bs412.gain;
init_bs412(&runtime->bs412, config.mpx_deviation, config.mpx_power, config.bs412_attack, config.bs412_release, config.bs412_max, config.sample_rate);
runtime->bs412.gain = last_gain;
@@ -453,7 +453,7 @@ void init_runtime(FM95_Runtime* runtime, FM95_Config config, bool rds_on) {
init_stereo_encoder(&runtime->stencode, 4.0f, &runtime->osc, (config.stereo == 2), config.volumes.mono, config.volumes.pilot, config.volumes.stereo);
if(config.agc_max != 0.0) {
if(runtime->agc.sampleRate == config.sample_rate) last_gain = runtime->agc.currentGain;
if((uint32_t)runtime->agc.sampleRate == config.sample_rate) last_gain = runtime->agc.currentGain;
initAGC(&runtime->agc, config.sample_rate, config.agc_target, config.agc_min, config.agc_max, config.agc_attack, config.agc_release);
runtime->agc.currentGain = last_gain;
}