aboutsummaryrefslogtreecommitdiff
path: root/keyboard_light.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2008-03-12 18:44:09 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2008-03-12 18:44:09 +0000
commit80dbf9dcc8d8c6b5a393b0a57c2ec4d5d8274f27 (patch)
tree32504f3e67b7af4b591f318f5198d83e6d6aa575 /keyboard_light.c
parent042552ed6790e7c9edc35b80819307c96c6134ee (diff)
added arguments to the object and finished the help patch using the PDDP template
svn path=/trunk/externals/apple/; revision=9575
Diffstat (limited to 'keyboard_light.c')
-rw-r--r--keyboard_light.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/keyboard_light.c b/keyboard_light.c
index 798d624..b7bac75 100644
--- a/keyboard_light.c
+++ b/keyboard_light.c
@@ -133,7 +133,7 @@ static void keyboard_light_free(t_keyboard_light* x)
}
-static void *keyboard_light_new(void)
+static void *keyboard_light_new(t_float level, t_float fade_time)
{
DEBUG(post("keyboard_light_new"););
t_keyboard_light *x = (t_keyboard_light *)pd_new(keyboard_light_class);
@@ -165,10 +165,12 @@ static void *keyboard_light_new(void)
error("[keyboard_light]: IOServiceOpen(): %d", kernResult);
}
- x->fade_time = 0.;
+ x->fade_time = fade_time;
floatinlet_new(&x->x_obj, &x->fade_time);
outlet_new(&x->x_obj, &s_float);
+ keyboard_light_float(x, level);
+
return (x);
}
@@ -179,7 +181,7 @@ void keyboard_light_setup(void)
(t_method)keyboard_light_free,
sizeof(t_keyboard_light),
CLASS_DEFAULT,
- A_DEFFLOAT, 0);
+ A_DEFFLOAT, A_DEFFLOAT, 0);
/* add inlet datatype methods */
class_addbang(keyboard_light_class,(t_method) keyboard_light_output);
class_addfloat(keyboard_light_class,(t_method) keyboard_light_float);