summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/src/g_io.c
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2009-07-03 22:16:11 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2009-07-03 22:16:11 +0000
commit0d4560cb0305029fa5f0739670286176ab47cb65 (patch)
tree9899f4324664a77e6a5884fdd1541818a28a2172 /apps/plugins/pdbox/PDa/src/g_io.c
parenteabeb928ddfdbe5fc6379efb87d9522803310649 (diff)
downloadrockbox-0d4560cb0305029fa5f0739670286176ab47cb65.tar.gz
rockbox-0d4560cb0305029fa5f0739670286176ab47cb65.zip
Accept FS #10244 by Wincent Balin: more pdbox work done for GSoC; also some keyword and line-ending fixes by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21626 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/src/g_io.c')
-rw-r--r--apps/plugins/pdbox/PDa/src/g_io.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/PDa/src/g_io.c b/apps/plugins/pdbox/PDa/src/g_io.c
index db69543a87..3df518717b 100644
--- a/apps/plugins/pdbox/PDa/src/g_io.c
+++ b/apps/plugins/pdbox/PDa/src/g_io.c
@@ -22,9 +22,17 @@ life elsewhere. */
22 * 22 *
23 */ 23 */
24 24
25#ifdef ROCKBOX
26#include "plugin.h"
27#include "pdbox.h"
28#include "m_pd.h"
29#include "g_canvas.h"
30#else
25#include "m_pd.h" 31#include "m_pd.h"
26#include "g_canvas.h" 32#include "g_canvas.h"
27#include <string.h> 33#include <string.h>
34#endif
35
28void signal_setborrowed(t_signal *sig, t_signal *sig2); 36void signal_setborrowed(t_signal *sig, t_signal *sig2);
29void signal_makereusable(t_signal *sig); 37void signal_makereusable(t_signal *sig);
30 38
@@ -51,6 +59,9 @@ typedef struct _vinlet
51 59
52static void *vinlet_new(t_symbol *s) 60static void *vinlet_new(t_symbol *s)
53{ 61{
62#ifdef ROCKBOX
63 (void) s;
64#endif
54 t_vinlet *x = (t_vinlet *)pd_new(vinlet_class); 65 t_vinlet *x = (t_vinlet *)pd_new(vinlet_class);
55 x->x_canvas = canvas_getcurrent(); 66 x->x_canvas = canvas_getcurrent();
56 x->x_inlet = canvas_addinlet(x->x_canvas, &x->x_obj.ob_pd, 0); 67 x->x_inlet = canvas_addinlet(x->x_canvas, &x->x_obj.ob_pd, 0);
@@ -108,7 +119,9 @@ int vinlet_issignal(t_vinlet *x)
108 return (x->x_buf != 0); 119 return (x->x_buf != 0);
109} 120}
110 121
122#ifndef ROCKBOX
111static int tot; 123static int tot;
124#endif
112 125
113t_int *vinlet_perform(t_int *w) 126t_int *vinlet_perform(t_int *w)
114{ 127{
@@ -176,7 +189,13 @@ void vinlet_dspprolog(t_vinlet *x, t_signal **parentsigs,
176 int myvecsize, int phase, int period, int frequency, int downsample, int upsample/* IOhannes */, int reblock, 189 int myvecsize, int phase, int period, int frequency, int downsample, int upsample/* IOhannes */, int reblock,
177 int switched) 190 int switched)
178{ 191{
192#ifdef ROCKBOX
193 t_signal *insig;
194 (void) frequency;
195 (void) switched;
196#else
179 t_signal *insig, *outsig; 197 t_signal *insig, *outsig;
198#endif
180 x->x_updown.downsample = downsample; 199 x->x_updown.downsample = downsample;
181 x->x_updown.upsample = upsample; 200 x->x_updown.upsample = upsample;
182 201
@@ -318,6 +337,9 @@ typedef struct _voutlet
318 337
319static void *voutlet_new(t_symbol *s) 338static void *voutlet_new(t_symbol *s)
320{ 339{
340#ifdef ROCKBOX
341 (void) s;
342#endif
321 t_voutlet *x = (t_voutlet *)pd_new(voutlet_class); 343 t_voutlet *x = (t_voutlet *)pd_new(voutlet_class);
322 x->x_canvas = canvas_getcurrent(); 344 x->x_canvas = canvas_getcurrent();
323 x->x_parentoutlet = canvas_addoutlet(x->x_canvas, &x->x_obj.ob_pd, 0); 345 x->x_parentoutlet = canvas_addoutlet(x->x_canvas, &x->x_obj.ob_pd, 0);
@@ -445,6 +467,12 @@ void voutlet_dspprolog(t_voutlet *x, t_signal **parentsigs,
445 int myvecsize, int phase, int period, int frequency, int downsample, int upsample /* IOhannes */, int reblock, 467 int myvecsize, int phase, int period, int frequency, int downsample, int upsample /* IOhannes */, int reblock,
446 int switched) 468 int switched)
447{ 469{
470#ifdef ROCKBOX
471 (void) myvecsize;
472 (void) phase;
473 (void) period;
474 (void) frequency;
475#endif
448 x->x_updown.downsample=downsample; x->x_updown.upsample=upsample; /* IOhannes */ 476 x->x_updown.downsample=downsample; x->x_updown.upsample=upsample; /* IOhannes */
449 x->x_justcopyout = (switched && !reblock); 477 x->x_justcopyout = (switched && !reblock);
450 if (reblock) 478 if (reblock)
@@ -488,7 +516,11 @@ void voutlet_dspepilog(t_voutlet *x, t_signal **parentsigs,
488 x->x_updown.downsample=downsample; x->x_updown.upsample=upsample; /* IOhannes */ 516 x->x_updown.downsample=downsample; x->x_updown.upsample=upsample; /* IOhannes */
489 if (reblock) 517 if (reblock)
490 { 518 {
519#ifdef ROCKBOX
520 t_signal *outsig;
521#else
491 t_signal *insig, *outsig; 522 t_signal *insig, *outsig;
523#endif
492 int parentvecsize, bufsize, oldbufsize; 524 int parentvecsize, bufsize, oldbufsize;
493 int re_parentvecsize; /* IOhannes */ 525 int re_parentvecsize; /* IOhannes */
494 int bigperiod, epilogphase, blockphase; 526 int bigperiod, epilogphase, blockphase;