From 739a8290a8b05645a2d055aed8e5eb76ba2e24e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Fri, 28 Aug 2015 17:55:26 +0000 Subject: one-true indentation svn path=/trunk/externals/zexy/; revision=17537 --- src/route~.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) (limited to 'src/route~.c') diff --git a/src/route~.c b/src/route~.c index c69d94e..aa073ba 100644 --- a/src/route~.c +++ b/src/route~.c @@ -1,4 +1,4 @@ -/* +/* * [route~]: 1-to-n signal routing * * (c) 1999-2011 IOhannes m zmölnig, forum::für::umläute, institute of electronic music and acoustics (iem) @@ -7,12 +7,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ @@ -20,32 +20,34 @@ #include "zexy.h" static t_class *route_tilde_class; -typedef struct _route_tilde -{ +typedef struct _route_tilde { t_object x_obj; t_outlet*x_sigout, *x_msgout; } t_route_tilde; -static void route_tilde_any(t_route_tilde *x, t_symbol *s, int argc, t_atom *argv) +static void route_tilde_any(t_route_tilde *x, t_symbol *s, int argc, + t_atom *argv) { outlet_anything(x->x_msgout, s, argc, argv); } t_int *route_tilde_perform(t_int *w) { - t_sample *in = (t_sample *)(w[1]); - t_sample *out = (t_sample *)(w[2]); - int n = (int)(w[3]); - while (n--) *out++ = *in++; - return (w+4); + t_sample *in = (t_sample *)(w[1]); + t_sample *out = (t_sample *)(w[2]); + int n = (int)(w[3]); + while (n--) { + *out++ = *in++; + } + return (w+4); } static void route_tilde_dsp(t_route_tilde *x, t_signal **sp) { - if(sp) + if(sp) { dsp_add(route_tilde_perform, 3, sp[0]->s_vec, sp[1]->s_vec, sp[0]->s_n); - else { + } else { route_tilde_any(x, gensym("dsp"), 0, 0); } } @@ -65,12 +67,14 @@ static void *route_tilde_new(void) void route_tilde_setup(void) { - route_tilde_class = class_new(gensym("route~"), (t_newmethod)route_tilde_new, (t_method)route_tilde_free, - sizeof(t_route_tilde), 0, A_NULL); + route_tilde_class = class_new(gensym("route~"), + (t_newmethod)route_tilde_new, (t_method)route_tilde_free, + sizeof(t_route_tilde), 0, A_NULL); class_addanything(route_tilde_class, (t_method)route_tilde_any); class_addmethod(route_tilde_class, nullfn, gensym("signal"), 0); - class_addmethod(route_tilde_class, (t_method)route_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(route_tilde_class, (t_method)route_tilde_dsp, + gensym("dsp"), A_CANT, 0); zexy_register("route~"); } -- cgit v1.2.1