diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-05-13 19:23:27 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-05-13 19:23:27 +0000 |
commit | 2aa0759077ce43b75470eae5be32c102aeea12ce (patch) | |
tree | f7d0aaf38fb862c37ebb4bae75c12c6e2c2c5bad /apps/plugins/pdbox/PDa/extra/hlshelf.c | |
parent | 4f4edd89e42a50539a140f6290aefd425720e469 (diff) | |
download | rockbox-2aa0759077ce43b75470eae5be32c102aeea12ce.tar.gz rockbox-2aa0759077ce43b75470eae5be32c102aeea12ce.zip |
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/hlshelf.c')
-rw-r--r-- | apps/plugins/pdbox/PDa/extra/hlshelf.c | 24 |
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 fd769921d0..61ec3a8a77 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) | |||
110 | void hlshelf_bang(t_hlshelf *x) | 110 | void hlshelf_bang(t_hlshelf *x) |
111 | { | 111 | { |
112 | t_atom at[6]; | 112 | t_atom at[6]; |
113 | /* float c0; unused */ | 113 | #ifndef ROCKBOX |
114 | float c0; | ||
115 | float g1, g2; | ||
116 | #endif | ||
114 | float c1, c2, d0, d1, d2; /* output coefs */ | 117 | float c1, c2, d0, d1, d2; /* output coefs */ |
115 | float a1, a2, b1, b2, g1, g2; /* temp coefs */ | 118 | float a1, a2, b1, b2; /* temp coefs */ |
116 | double xf; | 119 | double xf; |
117 | 120 | ||
118 | hlshelf_check(x); | 121 | hlshelf_check(x); |
@@ -123,7 +126,9 @@ void hlshelf_bang(t_hlshelf *x) | |||
123 | { | 126 | { |
124 | a1 = 1.0f; | 127 | a1 = 1.0f; |
125 | b1 = -1.0f; | 128 | b1 = -1.0f; |
129 | #ifndef ROCKBOX | ||
126 | g1 = 0.0f; | 130 | g1 = 0.0f; |
131 | #endif | ||
127 | } | 132 | } |
128 | else | 133 | else |
129 | { | 134 | { |
@@ -134,7 +139,9 @@ void hlshelf_bang(t_hlshelf *x) | |||
134 | 139 | ||
135 | a1 = (r - 1) / (r + 1); | 140 | a1 = (r - 1) / (r + 1); |
136 | b1 = (kr - 1) / (kr + 1); | 141 | b1 = (kr - 1) / (kr + 1); |
142 | #ifndef ROCKBOX | ||
137 | g1 = (kr + 1) / (r + 1); | 143 | g1 = (kr + 1) / (r + 1); |
144 | #endif | ||
138 | } | 145 | } |
139 | 146 | ||
140 | /* high shelf */ | 147 | /* high shelf */ |
@@ -143,7 +150,9 @@ void hlshelf_bang(t_hlshelf *x) | |||
143 | { | 150 | { |
144 | a2 = -1.0f; | 151 | a2 = -1.0f; |
145 | b2 = 1.0f; | 152 | b2 = 1.0f; |
153 | #ifndef ROCKBOX | ||
146 | g2 = 0.0f; | 154 | g2 = 0.0f; |
155 | #endif | ||
147 | } | 156 | } |
148 | else | 157 | else |
149 | { | 158 | { |
@@ -154,11 +163,15 @@ void hlshelf_bang(t_hlshelf *x) | |||
154 | 163 | ||
155 | a2 = (1 - r) / (1 + r); | 164 | a2 = (1 - r) / (1 + r); |
156 | b2 = (1 - kr) / (1 + kr); | 165 | b2 = (1 - kr) / (1 + kr); |
166 | #ifndef ROCKBOX | ||
157 | g2 = (1 + kr) / (1 + r); | 167 | g2 = (1 + kr) / (1 + r); |
168 | #endif | ||
158 | } | 169 | } |
159 | 170 | ||
160 | /* form product */ | 171 | /* form product */ |
161 | /* c0 = g1 * g2 * (float)(exp((double)(x->s_gain1) * 0.05f * 2.302585093f)); unused */ | 172 | #ifndef ROCKBOX |
173 | c0 = g1 * g2 * (float)(exp((double)(x->s_gain1) * 0.05f * 2.302585093f)); | ||
174 | #endif | ||
162 | c1 = a1 + a2; | 175 | c1 = a1 + a2; |
163 | c2 = a1 * a2; | 176 | c2 = a1 * a2; |
164 | d0 = 1.0f; | 177 | d0 = 1.0f; |
@@ -167,7 +180,10 @@ void hlshelf_bang(t_hlshelf *x) | |||
167 | 180 | ||
168 | if (!hlshelf_check_stability(-c1/d0,-c2/d0,d0/d0,d1/d0,d2/d0)) { | 181 | if (!hlshelf_check_stability(-c1/d0,-c2/d0,d0/d0,d1/d0,d2/d0)) { |
169 | post("hlshelf: filter unstable -> resetting"); | 182 | post("hlshelf: filter unstable -> resetting"); |
170 | /* c0=1.; unused */ c1=0.;c2=0.; | 183 | #ifndef ROCKBOX |
184 | c0=1.; | ||
185 | #endif | ||
186 | c1=0.;c2=0.; | ||
171 | d0=1.;d1=0.;d2=0.; | 187 | d0=1.;d1=0.;d2=0.; |
172 | } | 188 | } |
173 | 189 | ||