h3xx

cmt-1.16_freeverb3_fix.patch

Nov 20th, 2011
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.64 KB | None | 0 0
  1. Use the C99 function isnormal instead of messing with the floats format
  2. directly.
  3. Index: cmt/src/freeverb/Components/denormals.h
  4. ===================================================================
  5. --- cmt.orig/src/freeverb/Components/denormals.h    2008-12-19 15:46:05.000000000 -0300
  6. +++ cmt/src/freeverb/Components/denormals.h 2008-12-20 15:44:49.000000000 -0300
  7. @@ -8,7 +8,11 @@
  8.  #ifndef _denormals_
  9.  #define _denormals_
  10.  
  11. -#define undenormalise(sample) if(((*(unsigned int*)&sample)&0x7f800000)==0) sample=0.0f
  12. +#include <math.h>
  13. +
  14. +#define undenormalise(sample)   \
  15. +   if(!isnormal(sample))   \
  16. +       sample -= 0.0f
  17.  
  18.  #endif//_denormals_
Add Comment
Please, Sign In to add comment