diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-01-21 11:02:48 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-01-21 12:51:53 -0800 |
commit | 68347e96bbac8c60b32895c5214487f58990fea3 (patch) | |
tree | ae09d99a36c9faa43b8c6adaaa71bdb403b4a385 /src/modules | |
parent | 5e647dee95763d8f628bdc771a32c5d33c51d78a (diff) |
til_tap: introduce til_tap_t.owner
We need a way to identify owners of taps when cleaning up
their containing contexts, especially once they're hanging off
streams.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/plato/plato.c | 4 | ||||
-rw-r--r-- | src/modules/stars/stars.c | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/plato/plato.c b/src/modules/plato/plato.c index c8977bf..259d5b0 100644 --- a/src/modules/plato/plato.c +++ b/src/modules/plato/plato.c @@ -640,8 +640,8 @@ static til_module_context_t * plato_create_context(const til_module_t *module, t ctxt->setup = *((plato_setup_t *)setup); - ctxt->taps.spin_rate = til_tap_init_float(&ctxt->spin_rate, 1, &ctxt->setup.spin_rate, "spin_rate"); - ctxt->taps.orbit_rate = til_tap_init_float(&ctxt->orbit_rate, 1, &ctxt->setup.orbit_rate, "orbit_rate"); + ctxt->taps.spin_rate = til_tap_init_float(ctxt, &ctxt->spin_rate, 1, &ctxt->setup.spin_rate, "spin_rate"); + ctxt->taps.orbit_rate = til_tap_init_float(ctxt, &ctxt->orbit_rate, 1, &ctxt->setup.orbit_rate, "orbit_rate"); return &ctxt->til_module_context; } diff --git a/src/modules/stars/stars.c b/src/modules/stars/stars.c index e2c9a21..d64a3d8 100644 --- a/src/modules/stars/stars.c +++ b/src/modules/stars/stars.c @@ -89,11 +89,11 @@ static til_module_context_t * stars_create_context(const til_module_t *module, t ctxt->vars.offset_x = 0.5; ctxt->vars.offset_angle = 0.01; - ctxt->taps.rot_rate = til_tap_init_float(&ctxt->rot_rate, 1, &ctxt->vars.rot_rate, "rot_rate"); - ctxt->taps.rot_angle = til_tap_init_float(&ctxt->rot_angle, 1, &ctxt->vars.rot_angle, "rot_angle"); - ctxt->taps.offset_x = til_tap_init_float(&ctxt->offset_x, 1, &ctxt->vars.offset_x, "offset_x"); - ctxt->taps.offset_y = til_tap_init_float(&ctxt->offset_y, 1, &ctxt->vars.offset_y, "offset_y"); - ctxt->taps.offset_angle = til_tap_init_float(&ctxt->offset_angle, 1, &ctxt->vars.offset_angle, "offset_angle"); + ctxt->taps.rot_rate = til_tap_init_float(ctxt, &ctxt->rot_rate, 1, &ctxt->vars.rot_rate, "rot_rate"); + ctxt->taps.rot_angle = til_tap_init_float(ctxt, &ctxt->rot_angle, 1, &ctxt->vars.rot_angle, "rot_angle"); + ctxt->taps.offset_x = til_tap_init_float(ctxt, &ctxt->offset_x, 1, &ctxt->vars.offset_x, "offset_x"); + ctxt->taps.offset_y = til_tap_init_float(ctxt, &ctxt->offset_y, 1, &ctxt->vars.offset_y, "offset_y"); + ctxt->taps.offset_angle = til_tap_init_float(ctxt, &ctxt->offset_angle, 1, &ctxt->vars.offset_angle, "offset_angle"); //add a bunch of points for(z=0.01; z<1; z=z+0.01) { |