From 51874cf2a803c2f4f09b03420e4264f6d663a107 Mon Sep 17 00:00:00 2001 From: SarahW Date: Wed, 28 Mar 2018 21:10:08 +0100 Subject: [PATCH] Tweaked AudioPCI resampling filter gain to reduce clipping. --- src/sound_audiopci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sound_audiopci.c b/src/sound_audiopci.c index bb2cd73..61e1b33 100644 --- a/src/sound_audiopci.c +++ b/src/sound_audiopci.c @@ -1189,6 +1189,8 @@ static void generate_es1371_filter() for (n = 0; n < ES1371_NCoef; n++) gain += low_fir_es1371_coef[n] / (float)N; + gain /= 0.95; + /*Normalise filter, to produce unity gain*/ for (n = 0; n < ES1371_NCoef; n++) low_fir_es1371_coef[n] /= gain;