JS: Using functions in @sample
I'm developing a set of plugins with quite a bit of shared code. In order to make the code more DRY (Don't Repeat Yourself) I have implemented a lot of this stuff as functions located in a separate lib file, and that works well.
I now need to implement some DSP processing in the @sample part of the code that also is to be used by several plugins. It is tempting to do this as a function in the lib file as well, and then call the function from within the @sample block. However I am concerned about whether this might cause additional processing overhead as compared to having the code directly in the @sample block itself.
If this was a C++ project I would use inline and get the best of both worlds, but are there any advices regarding this in JS?
Thanks!
Trond
|