Forums > Dev


Apr 07 2006 | 11:06 am


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.


Apr 07 2006 | 12:34 pm

Hi Trond,

Here is an example of code calling a function that fixes denormals from ttblue: splib/tt_dcblock.h?r1=31&r2=39

And the definition of that function is at line 125 in this file: splib/tt_audio_base.h?annotate=49

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…

Apr 07 2006 | 12:38 pm



Apr 07 2006 | 2:55 pm

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;


Viewing 4 posts - 1 through 4 (of 4 total)

Forums > Dev