aboutsummaryrefslogtreecommitdiff
path: root/pd/extra/lrshift~/lrshift~.c
diff options
context:
space:
mode:
Diffstat (limited to 'pd/extra/lrshift~/lrshift~.c')
-rw-r--r--pd/extra/lrshift~/lrshift~.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pd/extra/lrshift~/lrshift~.c b/pd/extra/lrshift~/lrshift~.c
index ba1d5eeb..166facc1 100644
--- a/pd/extra/lrshift~/lrshift~.c
+++ b/pd/extra/lrshift~/lrshift~.c
@@ -8,6 +8,7 @@ typedef struct _lrshift_tilde
{
t_object x_obj;
int x_n;
+ float x_f;
} t_lrshift_tilde;
static t_int *leftshift_perform(t_int *w)
@@ -59,6 +60,7 @@ static void *lrshift_tilde_new(t_floatarg f)
{
t_lrshift_tilde *x = (t_lrshift_tilde *)pd_new(lrshift_tilde_class);
x->x_n = f;
+ x->x_f = 0;
outlet_new(&x->x_obj, gensym("signal"));
return (x);
}
@@ -68,7 +70,7 @@ void lrshift_tilde_setup(void)
lrshift_tilde_class = class_new(gensym("lrshift~"),
(t_newmethod)lrshift_tilde_new, 0, sizeof(t_lrshift_tilde), 0,
A_DEFFLOAT, 0);
- class_addmethod(lrshift_tilde_class, nullfn, gensym("signal"), 0);
+ CLASS_MAINSIGNALIN(lrshift_tilde_class, t_lrshift_tilde, x_f);
class_addmethod(lrshift_tilde_class, (t_method)lrshift_tilde_dsp,
gensym("dsp"), 0);
}