mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-07-30 16:29:15 +02:00
go back to irr but lower freq
This commit is contained in:
+4
-4
@@ -85,7 +85,7 @@ typedef struct {
|
|||||||
bit_ring_t rds_bitring[4];
|
bit_ring_t rds_bitring[4];
|
||||||
float rds_symbol[4];
|
float rds_symbol[4];
|
||||||
uint8_t rds_last_bit[4];
|
uint8_t rds_last_bit[4];
|
||||||
firfilt_rrrf rds_filter[4];
|
iirfilt_rrrf rds_filter[4];
|
||||||
} FM95_Runtime;
|
} FM95_Runtime;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -146,7 +146,7 @@ void cleanup_runtime(FM95_Runtime* runtime, const FM95_Config config) {
|
|||||||
} exit_stereo_encoder(&runtime->stencode);
|
} 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++) free(runtime->rds_bitring[i].bits);
|
||||||
for(int i = 0; i < 4; i++) firfilt_rrrf_destroy(runtime->rds_filter[i]);
|
for(int i = 0; i < 4; i++) iirfilt_rrrf_destroy(runtime->rds_filter[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanup_audio_runtime(FM95_Runtime *rt, const FM95_Options options) {
|
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++;
|
if(osc_stream >= 13) osc_stream++;
|
||||||
|
|
||||||
float shaped = 0.0f;
|
float shaped = 0.0f;
|
||||||
firfilt_rrrf_execute_one(runtime->rds_filter[stream], runtime->rds_symbol[stream] * clock, &shaped);
|
iirfilt_rrrf_execute(runtime->rds_filter[stream], runtime->rds_symbol[stream] * clock, &shaped);
|
||||||
|
|
||||||
float carrier = get_oscillator_cos_multiplier_ni(&runtime->osc, osc_stream * 4.0f);
|
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);
|
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_symbol[i] = -1.0f;
|
||||||
runtime->rds_last_bit[i] = 0;
|
runtime->rds_last_bit[i] = 0;
|
||||||
|
|
||||||
runtime->rds_filter[i] = firfilt_rrrf_create_kaiser(8, (2400.0f/config.sample_rate), 6.0f, 0.0f);
|
runtime->rds_filter[i] = iirfilt_rrrf_create_prototype(LIQUID_IIRDES_CHEBY2, LIQUID_IIRDES_LOWPASS, LIQUID_IIRDES_SOS, 8, (2400.0f/config.sample_rate), 0.0f, 1.0f, 40.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user