David Kirkpatrick wrote:
Hey guys,
I've got a piece of hardware that I am controlling from a custom built pd external. I can contol it fine, but when I quit pd, the device stays on. What I need is a way to trigger the device shutdown command when pd is exited. Does pd have a shutdown hook of some kind? I'm on windows XP.
there is a hook for the destructor (usually called "free-method" in this context) of an object. you pass it right after the constructor to class_new().
however, it's a known bug that pd does not call the free()-methods when it get's quitted (it does call them when you destroy an object manually or close a patch).
see http://sourceforge.net/tracker/index.php?func=detail&aid=1502860&gro...
and comment at your will.
fmas.dr IOhannes