I’m coding an external that moves any message it receives into the high priority thread (if it exists) – everything is working but at the moment I am suffering unnecessary message delay when overdrive is off.
Here’s what I’m doing:
If message is in the high priority thread output now (pass through) – if not schedule with a delay of zero.
That’s fine, but when overdrive is off, all messages are in the low priority thread. The object is designed to serialise messages into one thread, so it’s preferable not to use a delay when only one thread exists.
In order to determine this I just need to know whether or not overdrive is on – but I can’t find anything in the API about this.
You could send the ‘checkpreempt’ message to Max. As documented in Max’s reference, it takes a symbol argument that defines a receive object’s name to get the value. However, you could pass any symbol, whose s_thing member is an object with an int method (e.g. your object).