From 27b26d0478bc4efb222dee447b4cbe1f9933173d Mon Sep 17 00:00:00 2001 From: kub Date: Sat, 30 Apr 2022 14:04:28 +0200 Subject: [PATCH] sound, minor FM filtering optimization --- pico/sound/sound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pico/sound/sound.c b/pico/sound/sound.c index ae4bd3d8..456d211b 100644 --- a/pico/sound/sound.c +++ b/pico/sound/sound.c @@ -89,7 +89,7 @@ static void YM2612_setup_FIR(int inrate, int outrate, int stereo) mindiff = diff; Pico.snd.fm_fir_mul = mul; Pico.snd.fm_fir_div = div; - if (abs(mindiff) <= inrate/1000) break; // below error limit + if (abs(mindiff) <= inrate/1000+1) break; // below error limit } } printf("FM polyphase FIR ratio=%d/%d error=%.3f%%\n", -- 2.39.5