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:
      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...
    • 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;