From b317e860079c1fb166a95d0b5c17574cb6a32d4f Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Sun, 19 Feb 2012 03:03:32 +0000 Subject: reformat code to match Pd style by running 'astyle --style=ansi *.c' svn path=/trunk/externals/unauthorized/; revision=15994 --- compressor~.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'compressor~.c') diff --git a/compressor~.c b/compressor~.c index 4fef61c..f2dc545 100644 --- a/compressor~.c +++ b/compressor~.c @@ -47,17 +47,17 @@ static t_class *compressor_class; static void compressor_strength(t_compressor *x, t_floatarg fstrength ) { - if (fstrength < -1.0) + if (fstrength < -1.0) { - x->x_strength = -1.0; + x->x_strength = -1.0; } - else if (fstrength > 5) + else if (fstrength > 5) { - x->x_strength = 5; + x->x_strength = 5; } else { - x->x_strength = fstrength; + x->x_strength = fstrength; } x->x_pifactor = pow( M_PI, x->x_strength ); } @@ -81,9 +81,11 @@ static t_int *compressor_perform(t_int *w) t_float isample_fact = x->x_pifactor; t_float osample_fact = 2.0 / M_PI; - while (n--) { - *out = atan (*in * isample_fact) * osample_fact; - out++; in++; + while (n--) + { + *out = atan (*in * isample_fact) * osample_fact; + out++; + in++; } return (w+5); } @@ -97,7 +99,7 @@ void compressor_tilde_setup(void) { verbose(0, compressor_version ); compressor_class = class_new(gensym("compressor~"), (t_newmethod)compressor_new, 0, - sizeof(t_compressor), 0, 0); + sizeof(t_compressor), 0, 0); CLASS_MAINSIGNALIN( compressor_class, t_compressor, x_f ); class_addmethod(compressor_class, (t_method)compressor_dsp, gensym("dsp"), 0); class_addmethod(compressor_class, (t_method)compressor_strength, gensym("strength"), A_FLOAT, 0); -- cgit v1.2.1