summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2015-10-16 14:02:18 +1100
committerDamien Zammit <damien@zamaudio.com>2015-10-16 14:02:18 +1100
commit33d7f0dc948ae0dc0918e32e79ad74dc0ee78676 (patch)
treec0401127d1226ceb21f86c9db1d255a45b1c3907
parent39f9f635cb221e869e3a0d4efe03dcc2fe3d5070 (diff)
Lowered error on overlapped bands in graphic eq, higher cpu usage
Signed-off-by: Damien Zammit <damien@zamaudio.com>
-rw-r--r--plugins/ZamGEQ31/ZamGEQ31Plugin.cpp11
-rw-r--r--plugins/ZamGEQ31/ZamGEQ31Plugin.hpp4
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: