Question: VoltageAudioJack.SetValue() best practice

User avatar
honki-bobo
Posts: 310
Joined: Sat Nov 09, 2019 1:18 pm

Re: Question: VoltageAudioJack.SetValue() best practice

Post by honki-bobo »

Aarnville wrote: Fri Sep 09, 2022 9:47 am In practice I think the best way to deal with it is to have a global var for every output, modify it in ProcessSample when necessary and then at the very end of ProcessSample write to all the outputs using those vars.
I would say that depends on the "semantics" of your module. For instance, in my Math Bundle I evaluate each function in a loop from top to bottom and also set the value of the output jack in the loop. That allows me to chain all 8 functions to build more complex formulae and evaluate all of them in a single call to ProcessSample() to deliver the expected result at the end.
Image
Monkey Business Audio
Modules - Music - Twitter - YouTube
Post Reply

Return to “Module Designer”