Commit f2ada1ca authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*added dirty message to preset_hub so that it reports whenever its nodes have...

*added dirty message to preset_hub so that it reports whenever its nodes have changed values (which means there are unstored values)
parent 5e7bd45f
......@@ -46,6 +46,7 @@
//==================== forward declarations ========================//
void preset_hub_add_a_node(t_preset_hub *h, t_preset_node *x);
void preset_hub_dirty(t_preset_hub *h);
void preset_hub_recall(t_preset_hub *h, t_float f);
void preset_hub_store(t_preset_hub *h, t_float f);
void preset_hub_delete_a_node(t_preset_hub *h, t_preset_node *x);
......@@ -550,7 +551,8 @@ static void preset_node_anything(t_preset_node *x, t_symbol *s, int argc, t_atom
break;
}
}
if (x->pn_hub)
preset_hub_dirty(x->pn_hub);
}
//======== following functions are for interaction with the hub/pd =======//
......@@ -997,6 +999,13 @@ void preset_hub_bang(t_preset_hub *x)
outlet_anything(x->ph_outlet, gensym("current"), 1, ap);
}
void preset_hub_dirty(t_preset_hub *x)
{
t_atom ap[1];
SETFLOAT(ap+0, (t_float)1);
outlet_anything(x->ph_outlet, gensym("dirty"), 1, ap);
}
void preset_hub_recall(t_preset_hub *x, t_float f)
{
if(PH_DEBUG) fprintf(stderr,"hub_recall\n");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment