summaryrefslogtreecommitdiff
path: root/apps/plugins
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
parent4f4edd89e42a50539a140f6290aefd425720e469 (diff)
downloadrockbox-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')
-rw-r--r--apps/plugins/pdbox/PDa/extra/hlshelf.c24
-rw-r--r--apps/plugins/pdbox/PDa/intern/sfwrite~.c10
-rw-r--r--apps/plugins/pdbox/PDa/src/g_editor.c7
3 files changed, 32 insertions, 9 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)
110void hlshelf_bang(t_hlshelf *x) 110void 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
diff --git a/apps/plugins/pdbox/PDa/intern/sfwrite~.c b/apps/plugins/pdbox/PDa/intern/sfwrite~.c
index 6f801921ef..fb8ef9e109 100644
--- a/apps/plugins/pdbox/PDa/intern/sfwrite~.c
+++ b/apps/plugins/pdbox/PDa/intern/sfwrite~.c
@@ -136,8 +136,10 @@ static t_int *sfwrite_perform(t_int *w)
136 int i,num,n; 136 int i,num,n;
137 short* tout = out; 137 short* tout = out;
138 int ret; 138 int ret;
139#ifndef ROCKBOX
139 int timebefore,timeafter; 140 int timebefore,timeafter;
140 /* double late; unused */ 141 double late;
142#endif
141 143
142 for (i=0;i < c;i++) { 144 for (i=0;i < c;i++) {
143 in[i] = (t_sample *)(w[2+i]); 145 in[i] = (t_sample *)(w[2+i]);
@@ -155,13 +157,17 @@ static t_int *sfwrite_perform(t_int *w)
155 } 157 }
156 } 158 }
157 159
160#ifndef ROCKBOX
158 timebefore = sys_getrealtime(); 161 timebefore = sys_getrealtime();
162#endif
159 if ((ret =write(x->x_file,out,sizeof(short)*num*c)) < (signed int)sizeof(short)*num*c) { 163 if ((ret =write(x->x_file,out,sizeof(short)*num*c)) < (signed int)sizeof(short)*num*c) {
160 post("sfwrite: short write %d",ret); 164 post("sfwrite: short write %d",ret);
161 165
162 } 166 }
167#ifndef ROCKBOX
163 timeafter = sys_getrealtime(); 168 timeafter = sys_getrealtime();
164 /* late = timeafter - timebefore; unused */ 169 late = timeafter - timebefore;
170#endif
165 171
166#if 0 172#if 0
167 /* OK, we let only 10 ms block here */ 173 /* OK, we let only 10 ms block here */
diff --git a/apps/plugins/pdbox/PDa/src/g_editor.c b/apps/plugins/pdbox/PDa/src/g_editor.c
index 6a1fbab13b..90700d59e7 100644
--- a/apps/plugins/pdbox/PDa/src/g_editor.c
+++ b/apps/plugins/pdbox/PDa/src/g_editor.c
@@ -813,14 +813,15 @@ static t_gobj *canvas_findhitbox(t_canvas *x, int xpos, int ypos,
813 /* right-clicking on a canvas object pops up a menu. */ 813 /* right-clicking on a canvas object pops up a menu. */
814static void canvas_rightclick(t_canvas *x, int xpos, int ypos, t_gobj *y) 814static void canvas_rightclick(t_canvas *x, int xpos, int ypos, t_gobj *y)
815{ 815{
816 /* int canprop, canopen; unused */
817 /* canprop = */ (!y || (y && class_getpropertiesfn(pd_class(&y->g_pd))));
818 /* canopen = */ (y && zgetfn(&y->g_pd, gensym("menu-open")));
819#ifdef ROCKBOX 816#ifdef ROCKBOX
820 (void) x; 817 (void) x;
821 (void) xpos; 818 (void) xpos;
822 (void) ypos; 819 (void) ypos;
820 (void) y;
823#else /* ROCKBOX */ 821#else /* ROCKBOX */
822 int canprop, canopen;
823 canprop = (!y || (y && class_getpropertiesfn(pd_class(&y->g_pd))));
824 canopen = (y && zgetfn(&y->g_pd, gensym("menu-open")));
824 sys_vgui("pdtk_canvas_popup .x%x %d %d %d %d\n", 825 sys_vgui("pdtk_canvas_popup .x%x %d %d %d %d\n",
825 x, xpos, ypos, canprop, canopen); 826 x, xpos, ypos, canprop, canopen);
826#endif /* ROCKBOX */ 827#endif /* ROCKBOX */