Add FS #10214. Initial commit of the original PDa code for the GSoC Pure Data plugin...
[kugel-rb.git] / apps / plugins / pdbox / PDa / intern / delay.h
blob1aacd5682f7fb725a026db2a6f20772400b79d15
2 #ifndef __DELAY_H__
3 #define __DELAY_H__
6 extern t_class *sigdelwrite_class;
9 typedef struct delwritectl
11 int c_n;
12 t_sample *c_vec;
13 int c_phase;
14 } t_delwritectl;
16 typedef struct _sigdelwrite
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;
27 #define XTRASAMPS 4
28 #define SAMPBLK 4
30 /* routine to check that all delwrites/delreads/vds have same vecsize */
31 static void sigdelwrite_checkvecsize(t_sigdelwrite *x, int vecsize)
33 if (x->x_rsortno != ugen_getsortno())
35 x->x_vecsize = vecsize;
36 x->x_rsortno = ugen_getsortno();
38 else if (vecsize != x->x_vecsize)
39 pd_error(x, "delread/delwrite/vd vector size mismatch");
42 #endif
44 #ifndef __DELAY_H__
45 #define __DELAY_H__
48 extern t_class *sigdelwrite_class;
51 typedef struct delwritectl
53 int c_n;
54 t_sample *c_vec;
55 int c_phase;
56 } t_delwritectl;
58 typedef struct _sigdelwrite
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;
69 #define XTRASAMPS 4
70 #define SAMPBLK 4
72 /* routine to check that all delwrites/delreads/vds have same vecsize */
73 static void sigdelwrite_checkvecsize(t_sigdelwrite *x, int vecsize)
75 if (x->x_rsortno != ugen_getsortno())
77 x->x_vecsize = vecsize;
78 x->x_rsortno = ugen_getsortno();
80 else if (vecsize != x->x_vecsize)
81 pd_error(x, "delread/delwrite/vd vector size mismatch");
84 #endif