Welcome to %s forums

BrainModular Users Forum

Login Register

sdk how to process in the message thread, not the audio thread

Create your own modules in C++
Post Reply
sm_jamieson
Member
Posts: 551
Contact:

Unread post by sm_jamieson » 11 Sep 2017, 02:30

In the scripting language, you have:
ProcessIDLE
This procedure is called at the setup refresh speed (around 25ms or 50ms). It's the place where you do calculation which doesn't need a fast speed, IML or graphic stuffs like SendInternalMsg (see bellow).

Why is there not a similar thing in the SDK ?

I have a large update process (recreating a tree for menu display) that is causing problems in onProcess(). How can I draw it in the non-audio thread in an SDK user module ?

I suppose I could do it before redrawing in onPaint() if a flag is set but that seems like a bad solution.

Also, in a SDK user module can the callbacks be set like they can in scripting, like this quote from the scripting reference:

The callback is provided at messages rate, typically every 25 or 50ms depending on the setup refresh speed.
To ensure a faster callback (immediately after the inlet has been modified) use the SetFastCallBack procedure describe bellow.



Thanks,
Simon.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 11 Sep 2017, 12:40

callbacks on module parameters can be set as fast, intermediate normal or lower speed, so i guess a lowerspeed callback or onpaint will be equivalent and called each time step set in the setup.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests