aboutsummaryrefslogtreecommitdiff
path: root/compressor~.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-02-19 03:03:32 +0000
committerIOhannes m zmölnig <zmoelnig@iem.at>2015-10-14 15:23:30 +0200
commitb317e860079c1fb166a95d0b5c17574cb6a32d4f (patch)
tree4c887f7c644f618763b656fe4297509c07f36000 /compressor~.c
parentfb95f8f94849db058a566cde134f52b5f50ddfcf (diff)
reformat code to match Pd style by running 'astyle --style=ansi *.c'
svn path=/trunk/externals/unauthorized/; revision=15994
Diffstat (limited to 'compressor~.c')
-rw-r--r--compressor~.c20
1 files changed, 11 insertions, 9 deletions
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);