From c86affe3dcee19df108d13754a173bcafc3e769c Mon Sep 17 00:00:00 2001 From: Ed Kelly Date: Mon, 24 Sep 2007 15:33:04 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r8754, which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/ekext/; revision=8755 --- valve/valve.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'valve/valve.c') diff --git a/valve/valve.c b/valve/valve.c index 5762201..33a1713 100644 --- a/valve/valve.c +++ b/valve/valve.c @@ -1,10 +1,7 @@ /* takes a map like 0 1 3 4 7 and a route. if the route and the input are */ /* non-zero in the map, then the route is output from the object */ #include "m_pd.h" -#include -#include -#define MAXENTRIES 512 -#define LASTENTRY 511 +//#include static t_class *valve_class; @@ -16,7 +13,7 @@ typedef struct _valve int bufsize; t_float input, router, max; - t_outlet *routed, *notrouted; + t_outlet *routed, *rerouted; int flush; } t_valve; @@ -48,15 +45,16 @@ void valve_float(t_valve *x, t_floatarg fin) argb = (int)testb; if(arga && argb) { + outlet_float(x->rerouted, x->input); outlet_float(x->routed, x->router); } else if (!argb) { - outlet_float(x->notrouted, argb); + outlet_float(x->rerouted, 0); } else if (!arga && argb) { - outlet_float(x->notrouted, arga); + outlet_float(x->rerouted, 0); } } } @@ -101,7 +99,7 @@ void *valve_new(t_floatarg f) floatinlet_new(&x->x_obj, &x->router); x->routed = outlet_new(&x->x_obj, &s_float); - x->notrouted = outlet_new(&x->x_obj, &s_float); + x->rerouted = outlet_new(&x->x_obj, &s_float); return (void *)x; } -- cgit v1.2.1