summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/intern/delread~.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/intern/delread~.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/intern/delread~.c')
-rw-r--r--apps/plugins/pdbox/PDa/intern/delread~.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/plugins/pdbox/PDa/intern/delread~.c b/apps/plugins/pdbox/PDa/intern/delread~.c
index ed7d2f2d80..d7db986fea 100644
--- a/apps/plugins/pdbox/PDa/intern/delread~.c
+++ b/apps/plugins/pdbox/PDa/intern/delread~.c
@@ -1,11 +1,19 @@
1#ifdef ROCKBOX
2#include "plugin.h"
3#include "pdbox.h"
4#endif
5
1#include <m_pd.h> 6#include <m_pd.h>
2#include <m_fixed.h> 7#include <m_fixed.h>
3#include "delay.h"
4 8
5extern int ugen_getsortno(void); 9extern int ugen_getsortno(void);
6 10
11#include "delay.h"
12
7#define DEFDELVS 64 /* LATER get this from canvas at DSP time */ 13#define DEFDELVS 64 /* LATER get this from canvas at DSP time */
14#ifndef ROCKBOX
8static int delread_zero = 0; /* four bytes of zero for delread~, vd~ */ 15static int delread_zero = 0; /* four bytes of zero for delread~, vd~ */
16#endif
9 17
10static t_class *sigdelread_class; 18static t_class *sigdelread_class;
11 19
@@ -36,13 +44,17 @@ static void *sigdelread_new(t_symbol *s, t_floatarg f)
36 44
37static void sigdelread_float(t_sigdelread *x, t_float f) 45static void sigdelread_float(t_sigdelread *x, t_float f)
38{ 46{
47#ifndef ROCKBOX
39 int samps; 48 int samps;
49#endif
40 t_sigdelwrite *delwriter = 50 t_sigdelwrite *delwriter =
41 (t_sigdelwrite *)pd_findbyclass(x->x_sym, sigdelwrite_class); 51 (t_sigdelwrite *)pd_findbyclass(x->x_sym, sigdelwrite_class);
42 x->x_deltime = f; 52 x->x_deltime = f;
43 if (delwriter) 53 if (delwriter)
44 { 54 {
55#ifndef ROCKBOX
45 int delsize = delwriter->x_cspace.c_n; 56 int delsize = delwriter->x_cspace.c_n;
57#endif
46 x->x_delsamps = (int)(0.5 + x->x_sr * x->x_deltime) 58 x->x_delsamps = (int)(0.5 + x->x_sr * x->x_deltime)
47 + x->x_n - x->x_zerodel; 59 + x->x_n - x->x_zerodel;
48 if (x->x_delsamps < x->x_n) x->x_delsamps = x->x_n; 60 if (x->x_delsamps < x->x_n) x->x_delsamps = x->x_n;