aboutsummaryrefslogtreecommitdiff
path: root/pd/extra/lrshift~
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2004-11-06 16:07:34 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2004-11-06 16:07:34 +0000
commit981f641ef44fe4d72dcb0e1248a2f96ba53cee69 (patch)
treed5871a901628db17e12e6204d13b4bdb4b8a07d9 /pd/extra/lrshift~
parent5b0640e17d6db9e119d657fcadcf52ff317e704d (diff)
0.38 test 9 (mostly bug fixes)
svn path=/trunk/; revision=2226
Diffstat (limited to 'pd/extra/lrshift~')
-rw-r--r--pd/extra/lrshift~/lrshift~.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/pd/extra/lrshift~/lrshift~.c b/pd/extra/lrshift~/lrshift~.c
index 285696e2..ba1d5eeb 100644
--- a/pd/extra/lrshift~/lrshift~.c
+++ b/pd/extra/lrshift~/lrshift~.c
@@ -19,9 +19,9 @@ static t_int *leftshift_perform(t_int *w)
in += shift;
n -= shift;
while (n--)
- *out++ = *in++;
+ *out++ = *in++;
while (shift--)
- *out++ = 0;
+ *out++ = 0;
return (w+5);
}
@@ -34,9 +34,9 @@ static t_int *rightshift_perform(t_int *w)
n -= shift;
in -= shift;
while (n--)
- *--out = *--in;
+ *--out = *--in;
while (shift--)
- *--out = 0;
+ *--out = 0;
return (w+5);
}
@@ -45,14 +45,14 @@ static void lrshift_tilde_dsp(t_lrshift_tilde *x, t_signal **sp)
int n = sp[0]->s_n;
int shift = x->x_n;
if (shift > n)
- shift = n;
+ shift = n;
if (shift < -n)
- shift = -n;
+ shift = -n;
if (shift < 0)
- dsp_add(rightshift_perform, 4,
- sp[0]->s_vec + n, sp[1]->s_vec + n, n, -shift);
+ dsp_add(rightshift_perform, 4,
+ sp[0]->s_vec + n, sp[1]->s_vec + n, n, -shift);
else dsp_add(leftshift_perform, 4,
- sp[0]->s_vec, sp[1]->s_vec, n, shift);
+ sp[0]->s_vec, sp[1]->s_vec, n, shift);
}
static void *lrshift_tilde_new(t_floatarg f)
@@ -66,9 +66,9 @@ static void *lrshift_tilde_new(t_floatarg f)
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);
+ (t_newmethod)lrshift_tilde_new, 0, sizeof(t_lrshift_tilde), 0,
+ A_DEFFLOAT, 0);
class_addmethod(lrshift_tilde_class, nullfn, gensym("signal"), 0);
class_addmethod(lrshift_tilde_class, (t_method)lrshift_tilde_dsp,
- gensym("dsp"), 0);
+ gensym("dsp"), 0);
}