From de86cb7754d773a2dba3ae92eb0dfc4cb9d77cbd Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 29 Aug 2003 13:53:51 +0000 Subject: imported latest version 1.4 direct from Olaf svn path=/trunk/externals/maxlib/; revision=898 --- src/beat.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/beat.c') diff --git a/src/beat.c b/src/beat.c index 8a225e6..3ca552c 100644 --- a/src/beat.c +++ b/src/beat.c @@ -372,22 +372,32 @@ static void *beat_new(t_floatarg f) x->x_band_percent = 4; /* allow 4% 'jitter' by default */ if(f)x->x_band_percent = (t_int)f; -#ifndef MAXLIB - post(version); -#endif post("beat: band percentage set to %d", x->x_band_percent); return (void *)x; } +#ifndef MAXLIB void beat_setup(void) { beat_class = class_new(gensym("beat"), (t_newmethod)beat_new, (t_method)beat_free, sizeof(t_beat), 0, A_DEFFLOAT, 0); - class_addcreator((t_newmethod)beat_new, gensym("max.beat"), A_DEFFLOAT, 0); +#else +void maxlib_beat_setup(void) +{ + beat_class = class_new(gensym("maxlib_beat"), (t_newmethod)beat_new, + (t_method)beat_free, sizeof(t_beat), 0, A_DEFFLOAT, 0); +#endif class_addfloat(beat_class, beat_float); class_addmethod(beat_class, (t_method)beat_ft1, gensym("ft1"), A_FLOAT, 0); class_addmethod(beat_class, (t_method)beat_reset, gensym("reset"), 0); class_addmethod(beat_class, (t_method)beat_print, gensym("print"), 0); +#ifndef MAXLIB + class_sethelpsymbol(beat_class, gensym("help-beat.pd")); + post(version); +#else + class_addcreator((t_newmethod)beat_new, gensym("beat"), A_DEFFLOAT, 0); + class_sethelpsymbol(beat_class, gensym("maxlib/help-beat.pd")); +#endif } -- cgit v1.2.1