summaryrefslogtreecommitdiff
path: root/apps/plugins/pdbox/PDa/intern/delay.h
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2009-05-22 21:58:48 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2009-05-22 21:58:48 +0000
commit513389b4c1bc8afe4b2dc9947c534bfeb105e3da (patch)
tree10e673b35651ac567fed2eda0c679c7ade64cbc6 /apps/plugins/pdbox/PDa/intern/delay.h
parent95fa7f6a2ef466444fbe3fe87efc6d5db6b77b36 (diff)
downloadrockbox-513389b4c1bc8afe4b2dc9947c534bfeb105e3da.tar.gz
rockbox-513389b4c1bc8afe4b2dc9947c534bfeb105e3da.zip
Add FS #10214. Initial commit of the original PDa code for the GSoC Pure Data plugin project of Wincent Balin. Stripped some non-sourcefiles and added a rockbox readme that needs a bit more info from Wincent. Is added to CATEGORIES and viewers, but not yet to SUBDIRS (ie doesn't build yet)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21044 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/pdbox/PDa/intern/delay.h')
-rw-r--r--apps/plugins/pdbox/PDa/intern/delay.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/apps/plugins/pdbox/PDa/intern/delay.h b/apps/plugins/pdbox/PDa/intern/delay.h
new file mode 100644
index 0000000000..1aacd5682f
--- /dev/null
+++ b/apps/plugins/pdbox/PDa/intern/delay.h
@@ -0,0 +1,84 @@
1
2#ifndef __DELAY_H__
3#define __DELAY_H__
4
5
6extern t_class *sigdelwrite_class;
7
8
9typedef struct delwritectl
10{
11 int c_n;
12 t_sample *c_vec;
13 int c_phase;
14} t_delwritectl;
15
16typedef struct _sigdelwrite
17{
18 t_object x_obj;
19 t_symbol *x_sym;
20 t_delwritectl x_cspace;
21 int x_sortno; /* DSP sort number at which this was last put on chain */
22 int x_rsortno; /* DSP sort # for first delread or write in chain */
23 int x_vecsize; /* vector size for delread~ to use */
24 float x_f;
25} t_sigdelwrite;
26
27#define XTRASAMPS 4
28#define SAMPBLK 4
29
30 /* routine to check that all delwrites/delreads/vds have same vecsize */
31static void sigdelwrite_checkvecsize(t_sigdelwrite *x, int vecsize)
32{
33 if (x->x_rsortno != ugen_getsortno())
34 {
35 x->x_vecsize = vecsize;
36 x->x_rsortno = ugen_getsortno();
37 }
38 else if (vecsize != x->x_vecsize)
39 pd_error(x, "delread/delwrite/vd vector size mismatch");
40}
41
42#endif
43
44#ifndef __DELAY_H__
45#define __DELAY_H__
46
47
48extern t_class *sigdelwrite_class;
49
50
51typedef struct delwritectl
52{
53 int c_n;
54 t_sample *c_vec;
55 int c_phase;
56} t_delwritectl;
57
58typedef struct _sigdelwrite
59{
60 t_object x_obj;
61 t_symbol *x_sym;
62 t_delwritectl x_cspace;
63 int x_sortno; /* DSP sort number at which this was last put on chain */
64 int x_rsortno; /* DSP sort # for first delread or write in chain */
65 int x_vecsize; /* vector size for delread~ to use */
66 float x_f;
67} t_sigdelwrite;
68
69#define XTRASAMPS 4
70#define SAMPBLK 4
71
72 /* routine to check that all delwrites/delreads/vds have same vecsize */
73static void sigdelwrite_checkvecsize(t_sigdelwrite *x, int vecsize)
74{
75 if (x->x_rsortno != ugen_getsortno())
76 {
77 x->x_vecsize = vecsize;
78 x->x_rsortno = ugen_getsortno();
79 }
80 else if (vecsize != x->x_vecsize)
81 pd_error(x, "delread/delwrite/vd vector size mismatch");
82}
83
84#endif