mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-07-30 08:19:14 +02:00
it was not butterworth, but... redo the audio calc only if it needs change
This commit is contained in:
+5
-3
@@ -442,7 +442,7 @@ void init_runtime(FM95_Runtime* runtime, const FM95_Config config) {
|
|||||||
runtime->rds_symbol[i] = -1.0f;
|
runtime->rds_symbol[i] = -1.0f;
|
||||||
runtime->rds_last_bit[i] = 0;
|
runtime->rds_last_bit[i] = 0;
|
||||||
|
|
||||||
runtime->rds_filter[i] = iirfilt_rrrf_create_prototype(LIQUID_IIRDES_CHEBY2, LIQUID_IIRDES_LOWPASS, LIQUID_IIRDES_SOS, 5, (2400.0f/config.sample_rate), 0.0f, 1.0f, 30.0f);
|
runtime->rds_filter[i] = iirfilt_rrrf_create_prototype(LIQUID_IIRDES_BUTTER, LIQUID_IIRDES_LOWPASS, LIQUID_IIRDES_SOS, 5, (2400.0f/config.sample_rate), 0.0f, 1.0f, 30.0f);
|
||||||
|
|
||||||
if(config.stereo_ssb) init_delay_line(&runtime->rds_delays[i], config.stereo_ssb*2);
|
if(config.stereo_ssb) init_delay_line(&runtime->rds_delays[i], config.stereo_ssb*2);
|
||||||
}
|
}
|
||||||
@@ -585,8 +585,10 @@ static void *handle_client(ipc_client_arg_t *arg) {
|
|||||||
case 113:
|
case 113:
|
||||||
// Set RDS streams
|
// Set RDS streams
|
||||||
memcpy(&bval, buf + 1, 1);
|
memcpy(&bval, buf + 1, 1);
|
||||||
data->config->rds_streams = bval;
|
if(data->config->rds_streams != bval) {
|
||||||
data->config->volumes.audio = calculate_sharedaudio_volume(data->config->volumes, bval);
|
data->config->rds_streams = bval;
|
||||||
|
data->config->volumes.audio = calculate_sharedaudio_volume(data->config->volumes, bval);
|
||||||
|
}
|
||||||
reply = 0;
|
reply = 0;
|
||||||
break;
|
break;
|
||||||
case 0xfe:
|
case 0xfe:
|
||||||
|
|||||||
Reference in New Issue
Block a user