diff --git a/src/fm95.c b/src/fm95.c index 859725d..fa53230 100644 --- a/src/fm95.c +++ b/src/fm95.c @@ -85,7 +85,7 @@ typedef struct { bit_ring_t rds_bitring[4]; float rds_symbol[4]; uint8_t rds_last_bit[4]; - iirfilt_rrrf rds_filter[4]; + firfilt_rrrf rds_filter[4]; } FM95_Runtime; typedef struct { @@ -146,7 +146,7 @@ void cleanup_runtime(FM95_Runtime* runtime, const FM95_Config config) { } exit_stereo_encoder(&runtime->stencode); for(int i = 0; i < 4; i++) free(runtime->rds_bitring[i].bits); - for(int i = 0; i < 4; i++) iirfilt_rrrf_destroy(runtime->rds_filter[i]); + for(int i = 0; i < 4; i++) firfilt_rrrf_destroy(runtime->rds_filter[i]); } void cleanup_audio_runtime(FM95_Runtime *rt, const FM95_Options options) { @@ -257,7 +257,7 @@ int run_fm95(FM95_Config* config, FM95_Runtime* runtime, FM95_RunResult* result) if(osc_stream >= 13) osc_stream++; float shaped = 0.0f; - iirfilt_rrrf_execute(runtime->rds_filter[stream], runtime->rds_symbol[stream] * clock, &shaped); + firfilt_rrrf_execute_one(runtime->rds_filter[stream], runtime->rds_symbol[stream] * clock, &shaped); float carrier = get_oscillator_cos_multiplier_ni(&runtime->osc, osc_stream * 4.0f); if(config->stereo_ssb) carrier = delay_line(&runtime->rds_delays[stream], carrier); @@ -452,7 +452,7 @@ void init_runtime(FM95_Runtime* runtime, const FM95_Config config) { runtime->rds_symbol[i] = -1.0f; runtime->rds_last_bit[i] = 0; - runtime->rds_filter[i] = iirfilt_rrrf_create_prototype(LIQUID_IIRDES_CHEBY2, LIQUID_IIRDES_LOWPASS, LIQUID_IIRDES_SOS, 8, (4750.0f/config.sample_rate), 0.0f, 1.0f, 40.0f); + runtime->rds_filter[i] = firfilt_rrrf_create_kaiser(8, (2400.0f/config.sample_rate), 6.0f, 0.0f); } }