summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-02-26 00:58:07 +0000
committerThom Johansen <thomj@rockbox.org>2007-02-26 00:58:07 +0000
commitdeb69d280ddfa9ac0874683cca36ecd9fef1c7dc (patch)
tree1035a8499f7e45556eca9c1d8c0b27d5756b6cc5
parenta7fabf0741c91fb0a2c28b2d8357bcc4630300af (diff)
downloadrockbox-deb69d280ddfa9ac0874683cca36ecd9fef1c7dc.tar.gz
rockbox-deb69d280ddfa9ac0874683cca36ecd9fef1c7dc.zip
Wrap filter_bishelf_coefs with HAVE_SW_TONE_CONTROLS to not waste bytes on targets that don't use it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12490 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/eq.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/eq.c b/apps/eq.c
index 1d74db790e..e06bd3e09e 100644
--- a/apps/eq.c
+++ b/apps/eq.c
@@ -147,6 +147,7 @@ void filter_shelf_coefs(unsigned long cutoff, long ad, long an, int32_t *c)
147 c[2] = -DIV64(a1, a0, 31); 147 c[2] = -DIV64(a1, a0, 31);
148} 148}
149 149
150#ifdef HAVE_SW_TONE_CONTROLS
150/** 151/**
151 * Calculate second order section filter consisting of one low-shelf and one 152 * Calculate second order section filter consisting of one low-shelf and one
152 * high-shelf section. 153 * high-shelf section.
@@ -198,6 +199,7 @@ void filter_bishelf_coefs(unsigned long cutoff_low, unsigned long cutoff_high,
198 *c++ = -FRACMUL_SHL(FRACMUL(a0, a3) + FRACMUL(a1, a2), rcp_a0, 5); 199 *c++ = -FRACMUL_SHL(FRACMUL(a0, a3) + FRACMUL(a1, a2), rcp_a0, 5);
199 *c++ = -FRACMUL_SHL(FRACMUL(a1, a3), rcp_a0, 5); 200 *c++ = -FRACMUL_SHL(FRACMUL(a1, a3), rcp_a0, 5);
200} 201}
202#endif
201 203
202/* Coef calculation taken from Audio-EQ-Cookbook.txt by Robert Bristow-Johnson. 204/* Coef calculation taken from Audio-EQ-Cookbook.txt by Robert Bristow-Johnson.
203 * Slightly faster calculation can be done by deriving forms which use tan() 205 * Slightly faster calculation can be done by deriving forms which use tan()