Starting/stopping the dac by program in Max 7.01
Hi,
In our faustgen~ external we were using the following code to start/stop the "dac":
dsp_status("stop");
...so some stuff...
dsp_status("start");
void faustgen::dsp_status(const char* mess)
{
t_pxobject* dac = 0;
if ((dac = check_dac())) {
t_atom msg[1];
atom_setsym(msg, gensym(mess));
object_method_typed(dac, gensym("message"), 1, msg, 0);
} else { // Global
object_method(gensym("dsp")->s_thing, gensym(mess));
}
}
t_pxobject* faustgen::check_dac()
{
t_object *patcher, *box, *obj;
object_obex_lookup(this, gensym("
for (box = jpatcher_get_firstobject(patcher); box; box = jbox_get_nextobject(box)) {
obj = jbox_get_object(box);
if (obj) {
printf("object_classname %s\n", object_classname(obj)->s_name);
if ((object_classname(obj) == gensym("dac~"))
|| (object_classname(obj) == gensym("ezdac~"))
|| (object_classname(obj) == gensym("ezadc~"))
|| (object_classname(obj) == gensym("adc~"))) {
return (t_pxobject*)box;
}
}
}
return 0;
}
This code does not work anymore in Max 7.01, the "check_dac" function correctly discover the "dac" object in the patch, but the "dsp_status" method does not stop it anymore…
Any idea?
Thanks.
Stéphane Letz
Basically I'm using the same method as described here :
It does not work, and the code here does not work either:
object_method(gensym("dsp")->s_thing, gensym(mess));
Stéphane Letz
Still no answer? Anybody of Cycling74 here?
I confirm that this bug still exists in Max 7.0.2.