better handling wide IF

master
Zilog80 2024-06-06 00:20:35 +02:00
rodzic ad2a3573dc
commit 853d5b99ae
2 zmienionych plików z 17 dodań i 1 usunięć

Wyświetl plik

@ -643,6 +643,8 @@ static int init_buffers(dsp_t *dsp) {
float t_bw; // dec_lowpass: transition_bandwidth
int taps; // dec_lowpass: taps
int wideIF = IF_sr > 60e3;
//if (dsp->opt_IFmin) IF_sr = IF_SAMPLE_RATE_MIN;
if (IF_sr > sr_base) IF_sr = sr_base;
if (IF_sr < sr_base) {
@ -652,6 +654,12 @@ static int init_buffers(dsp_t *dsp) {
f_lp = (IF_sr+20e3)/(4.0*sr_base); // for IF=48k
t_bw = (IF_sr-20e3)/*/2.0*/;
if (wideIF) { // IF=96k
f_lp = (IF_sr+60e3)/(4.0*sr_base);
t_bw = (IF_sr-60e3)/*/2.0*/;
}
else
if (dsp->opt_IFmin) {
t_bw = (IF_sr-12e3);
}

Wyświetl plik

@ -1018,9 +1018,12 @@ static int init_buffers() {
float f_lp; // dec_lowpass: lowpass_bw/2
float t_bw; // dec_lowpass: transition_bw
int taps; // dec_lowpass: taps
int wideIF = 0;
if (set_lpIQ > IF_sr) IF_sr = set_lpIQ;
wideIF = IF_sr > 60e3;
sr_base = sample_rate;
if (option_min) IF_sr = IF_SAMPLE_RATE_MIN;
@ -1030,8 +1033,13 @@ static int init_buffers() {
decM = sr_base / IF_sr;
}
f_lp = (IF_sr+20e3)/(4.0*sr_base);
f_lp = (IF_sr+20e3)/(4.0*sr_base); // IF=48k
t_bw = (IF_sr-20e3)/*/2.0*/;
if (wideIF) { // IF=96k
f_lp = (IF_sr+60e3)/(4.0*sr_base);
t_bw = (IF_sr-60e3)/*/2.0*/;
}
else
if (option_min) {
t_bw = (IF_sr-12e3);
}