From 33d7f0dc948ae0dc0918e32e79ad74dc0ee78676 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Fri, 16 Oct 2015 14:02:18 +1100 Subject: Lowered error on overlapped bands in graphic eq, higher cpu usage Signed-off-by: Damien Zammit --- plugins/ZamGEQ31/ZamGEQ31Plugin.cpp | 11 ++++++----- plugins/ZamGEQ31/ZamGEQ31Plugin.hpp | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/ZamGEQ31/ZamGEQ31Plugin.cpp b/plugins/ZamGEQ31/ZamGEQ31Plugin.cpp index cac1584..b6cd816 100644 --- a/plugins/ZamGEQ31/ZamGEQ31Plugin.cpp +++ b/plugins/ZamGEQ31/ZamGEQ31Plugin.cpp @@ -525,10 +525,11 @@ void ZamGEQ31Plugin::geq(int i, float srate, float g) // 1, 1, 1, 1, 1, 1, 1, 1, // 1, 1, 1, 2, 3 }; - const int stack[29] = { 16, 14, 10, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 10, 14, 16 }; + // 0.15dB tolerance + const int stack[29] = { 8, 8, 8, 8, 8, 8, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 10, + 11, 12, 15, 20, 20 }; w = 2. * M_PI / srate; omegaB = w * (omegaU[i] - omegaL[i]); @@ -676,7 +677,7 @@ void ZamGEQ31Plugin::activate() { int i, j; for (i = 0; i < 29; i++) { - for (j = 0; j < 17; j++) { + for (j = 0; j < 21; j++) { w11[i][j] = 0.; w12[i][j] = 0.; w21[i][j] = 0.; diff --git a/plugins/ZamGEQ31/ZamGEQ31Plugin.hpp b/plugins/ZamGEQ31/ZamGEQ31Plugin.hpp index 67bc4e2..84c2753 100644 --- a/plugins/ZamGEQ31/ZamGEQ31Plugin.hpp +++ b/plugins/ZamGEQ31/ZamGEQ31Plugin.hpp @@ -138,9 +138,9 @@ protected: void geq(int i, float srate, float g); double run_filter(int i, double in); - double omegaL[29], omegaU[29], k[29], v[29], a[29], cm[29][17], a0m[29][17]; + double omegaL[29], omegaU[29], k[29], v[29], a[29], cm[29][21], a0m[29][21]; int m[29]; - double w11[29][17], w12[29][17], w21[29][17], w22[29][17]; + double w11[29][21], w12[29][21], w21[29][21], w22[29][21]; // ------------------------------------------------------------------- private: -- cgit v1.2.3