summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/extra
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-05-13 19:23:27 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-05-13 19:23:27 +0000
commit2aa0759077ce43b75470eae5be32c102aeea12ce (patch)
treef7d0aaf38fb862c37ebb4bae75c12c6e2c2c5bad /apps/plugins/pdbox/PDa/extra
parent4f4edd89e42a50539a140f6290aefd425720e469 (diff)
downloadrockbox-2aa0759077ce43b75470eae5be32c102aeea12ce.zip
rockbox-2aa0759077ce43b75470eae5be32c102aeea12ce.tar.gz
rockbox-2aa0759077ce43b75470eae5be32c102aeea12ce.tar.bz2
rockbox-2aa0759077ce43b75470eae5be32c102aeea12ce.tar.xz
Fix even more 'set but not used' warnings and a regression.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29873 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/extra')
-rw-r--r--apps/plugins/pdbox/PDa/extra/hlshelf.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/apps/plugins/pdbox/PDa/extra/hlshelf.c b/apps/plugins/pdbox/PDa/extra/hlshelf.c
index fd76992..61ec3a8 100644
--- a/apps/plugins/pdbox/PDa/extra/hlshelf.c
+++ b/apps/plugins/pdbox/PDa/extra/hlshelf.c
@@ -110,9 +110,12 @@ void hlshelf_check(t_hlshelf *x)
void hlshelf_bang(t_hlshelf *x)
{
t_atom at[6];
- /* float c0; unused */
+#ifndef ROCKBOX
+ float c0;
+ float g1, g2;
+#endif
float c1, c2, d0, d1, d2; /* output coefs */
- float a1, a2, b1, b2, g1, g2; /* temp coefs */
+ float a1, a2, b1, b2; /* temp coefs */
double xf;
hlshelf_check(x);
@@ -123,7 +126,9 @@ void hlshelf_bang(t_hlshelf *x)
{
a1 = 1.0f;
b1 = -1.0f;
+#ifndef ROCKBOX
g1 = 0.0f;
+#endif
}
else
{
@@ -134,7 +139,9 @@ void hlshelf_bang(t_hlshelf *x)
a1 = (r - 1) / (r + 1);
b1 = (kr - 1) / (kr + 1);
+#ifndef ROCKBOX
g1 = (kr + 1) / (r + 1);
+#endif
}
/* high shelf */
@@ -143,7 +150,9 @@ void hlshelf_bang(t_hlshelf *x)
{
a2 = -1.0f;
b2 = 1.0f;
+#ifndef ROCKBOX
g2 = 0.0f;
+#endif
}
else
{
@@ -154,11 +163,15 @@ void hlshelf_bang(t_hlshelf *x)
a2 = (1 - r) / (1 + r);
b2 = (1 - kr) / (1 + kr);
+#ifndef ROCKBOX
g2 = (1 + kr) / (1 + r);
+#endif
}
/* form product */
- /* c0 = g1 * g2 * (float)(exp((double)(x->s_gain1) * 0.05f * 2.302585093f)); unused */
+#ifndef ROCKBOX
+ c0 = g1 * g2 * (float)(exp((double)(x->s_gain1) * 0.05f * 2.302585093f));
+#endif
c1 = a1 + a2;
c2 = a1 * a2;
d0 = 1.0f;
@@ -167,7 +180,10 @@ void hlshelf_bang(t_hlshelf *x)
if (!hlshelf_check_stability(-c1/d0,-c2/d0,d0/d0,d1/d0,d2/d0)) {
post("hlshelf: filter unstable -> resetting");
- /* c0=1.; unused */ c1=0.;c2=0.;
+#ifndef ROCKBOX
+ c0=1.;
+#endif
+ c1=0.;c2=0.;
d0=1.;d1=0.;d2=0.;
}