From ab39694500d71765c930c8c34e246ee537db1bc8 Mon Sep 17 00:00:00 2001 From: Ciaran Anscomb Date: Sat, 28 Dec 2024 19:23:30 +0000 Subject: [PATCH] Add 1 to centre tap in reverse_fir() High pass filter should invert all coefficients of low pass filter, then add 1 to the centre tap, not the last tap. --- src/common-filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common-filters.c b/src/common-filters.c index c731da1..4ae0e08 100644 --- a/src/common-filters.c +++ b/src/common-filters.c @@ -134,7 +134,7 @@ void reverse_fir(double *fir, int length) for (i = 0; i < length; i++) fir[i] = -1.0 * fir[i]; - fir[length - 1] += 1.0; + fir[length / 2] += 1.0; } /* Algorithm taken form: