detecting DAC off?

Jun 12, 2009 at 3:54pm

detecting DAC off?

There is probably a really obvious answer to this, but I sure can’t find it. In an external object, is there a way (method that gets called) to detect when the DAC has been turned off? The object_free() function fires when it the external gets deleted, but I need to do some stuff when conversion is stopped.

While I’m asking questions — is there a good way for searching through the Max5 SDK for info? fgrepping through the html pages doesn’t really do it for me anymore.

brad
http://music.columbia.edu/~brad

#44343
Jun 12, 2009 at 4:10pm
Brad Garton wrote on Fri, 12 June 2009 09:54
In an external object, is there a way (method that gets called) to detect when the DAC has been turned off?

yes, (at least in max4) there is a dspstate method that gets called.
i used something like the following in my code.

in main:
addmess((method)myObj_dspstate, "dspstate", A_CANT, 0);

void myObj_dspstate(t_myObj *x, long n) {
	if(n)
		do this...
	else
		do that...
}

volker.

#159522
Jun 12, 2009 at 4:39pm

Thanks Volker! Works just fine (in max5 too).

brad
http://music.columbia.edu/~brad

#159523

You must be logged in to reply to this topic.