Welcome to %s forums

BrainModular Users Forum

Login Register

sdk onReadyToProcess callback

Tell us what you'd like Usine to do
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 23 Aug 2018, 13:10

maybe thats already possible but couldn't find how..

when usine launch and open a module, there is a slight delay before its ready to process.

for now if have something like a bool ready flag set to false, and switch it in onProcess() ready = true;

not a drastic problem but setting it every bloc is prob not needed and efficient.

is there a way to get info when module is ready to process, or if not, could a possible procedure beeing added if not complex?

sm_jamieson
Member
Posts: 555
Contact:

Unread post by sm_jamieson » 23 Aug 2018, 14:27

I do the same thing in my modules. Such a callback would be very useful.

User avatar
senso
Site Admin
Posts: 4424
Location: France
Contact:

Unread post by senso » 01 Nov 2018, 13:15

I understand the pb.
Actually it's hard to know when a module is ready to process: it can be different if it is a script, subpatch, regular module, user, etc.
The callback is not appropriate because of the delay (25-50ms in the general case); the callback will come after the OnProcess is called.
I have such an internal flag in patches that I could export in the UsineMaster structure as a Longbool pointer. Something like "ready_to_process". When False the patch is not calculated ie: apply-polyphony, compile-script, loading, etc.

It's the more accurate and simple solution?

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 01 Nov 2018, 16:15

yeah thats not a drastic issue no problem

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests