From 7591a024f184bd385d35583d19d86c1d5f2531ba Mon Sep 17 00:00:00 2001 From: Tom Schouten Date: Fri, 1 Sep 2006 13:45:31 +0000 Subject: pdp current darcs merge svn path=/trunk/externals/pdp/; revision=5816 --- modules/generic/pdp_del.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'modules/generic/pdp_del.c') diff --git a/modules/generic/pdp_del.c b/modules/generic/pdp_del.c index 4b51023..6b7aeb2 100644 --- a/modules/generic/pdp_del.c +++ b/modules/generic/pdp_del.c @@ -71,7 +71,14 @@ static void pdp_del_input_0(t_pdp_del *x, t_symbol *s, t_floatarg f) else if (s == gensym("process")){ out = (((x->x_head + x->x_delay)) % x->x_order); packet = x->x_packet[out]; - pdp_packet_pass_if_valid(x->x_outlet0, &x->x_packet[out]); + + // originally, we wouldn't keep the packet in the delay line to save memory + // however, this behaviour is very annoying, and doesn't allow ''scratching'' + // so we send out a copy instead. + // pdp_packet_pass_if_valid(x->x_outlet0, &x->x_packet[out]); + int p = pdp_packet_copy_ro(packet); + pdp_packet_pass_if_valid(x->x_outlet0, &p); + /* if (-1 != packet){ @@ -88,6 +95,15 @@ static void pdp_del_input_0(t_pdp_del *x, t_symbol *s, t_floatarg f) */ x->x_head = (x->x_head + x->x_order - 1) % x->x_order; + +/* + int i; + for (i=0; ix_order; i++){ + fprintf(stderr, " %d", x->x_packet[i]); + } + fprintf(stderr, "\n"); +*/ + } -- cgit v1.2.1