aboutsummaryrefslogtreecommitdiff
path: root/src/gauss.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gauss.c')
-rw-r--r--src/gauss.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/gauss.c b/src/gauss.c
index ec81e70..2a441c4 100644
--- a/src/gauss.c
+++ b/src/gauss.c
@@ -66,12 +66,23 @@ static void rand_gauss_bang(t_rand_gauss *x)
outlet_float(x->x_obj.ob_outlet, x->x_sigma*scale*(sum-halfN)+x->x_mu);
}
+#ifndef MAXLIB
void gauss_setup(void)
{
rand_gauss_class = class_new(gensym("gauss"), (t_newmethod)rand_gauss_new, 0,
sizeof(t_rand_gauss), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
class_addbang(rand_gauss_class, rand_gauss_bang);
-#ifndef MAXLIB
+ class_sethelpsymbol(rand_gauss_class, gensym("help-gauss.pd"));
post(version);
-#endif
}
+#else
+void maxlib_gauss_setup(void)
+{
+ rand_gauss_class = class_new(gensym("maxlib_gauss"), (t_newmethod)rand_gauss_new, 0,
+ sizeof(t_rand_gauss), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
+ class_addcreator((t_newmethod)rand_gauss_new, gensym("gauss"), A_DEFFLOAT, 0);
+ class_addbang(rand_gauss_class, rand_gauss_bang);
+ class_sethelpsymbol(rand_gauss_class, gensym("maxlib/help-gauss.pd"));
+}
+#endif
+