root/modules/audio_filter/spatializer/denormals.h

Revision 8a486daed7bf38d6b336869685e49c0bbfa133db, 423 bytes (checked in by Jean-Baptiste Kempf <jb@videolan.org>, 3 months ago)

Workaround spatializer bugs.
(cherry picked from commit 77cc89e3d9349f3d5a2de947f9be478dd28436dd)
(cherry picked from commit 6d4830b864af38d7126aee103a6bcfe76bc80e89)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>

  • Property mode set to 100644
Line 
1 // Macro for killing denormalled numbers
2 //
3 // Written by Jezar at Dreampoint, June 2000
4 // http://www.dreampoint.co.uk
5 // Based on IS_DENORMAL macro by Jon Watte
6 // This code is public domain
7
8 #ifndef _denormals_
9 #define _denormals_
10
11 #include <stdint.h>
12
13 #include <math.h>
14
15 static inline float undenormalise( float f )
16 {
17     if( fpclassify( f ) == FP_SUBNORMAL  )
18         return 0.0;
19     return f;
20 }
21
22 #endif//_denormals_
23
Note: See TracBrowser for help on using the browser.