I got some feedback from a user of one of my externals
(tl.crossover4~) that he is experiencing occasional bursts in CPU
usage. It might be that this is due to some denorm issues in the code
of the externals. I don’t have any experience with this, so I am
wondering if there are some suggestions about what to do with it, or
sample codes, possibly from other open-sourced 3rd party externals,
that I could look into.
Here is an example of code calling a function that fixes denormals from ttblue:
And the definition of that function is at line 125 in this file:
Because the function is in the class definition itself it will automatically be inlined by the compiler so you don’t incur a cpu hit for calling the function. Basically it is adding and subtracting a small number such that the round-off error makes the number that is returned no longer denormalled.
I hope this is useful…
I forgot to include this piece of information (which is defined in the base cpp file):
const double tt_audio_base::anti_denormal_value = 1e-18;
C74 RSS Feed | © Copyright Cycling '74