Missing file
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 8 Aug 2009 07:45:50 +0000 (10:45 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 8 Aug 2009 07:46:23 +0000 (10:46 +0300)
modules/audio_filter/spatializer/denormals.c [new file with mode: 0644]

diff --git a/modules/audio_filter/spatializer/denormals.c b/modules/audio_filter/spatializer/denormals.c
new file mode 100644 (file)
index 0000000..0477f72
--- /dev/null
@@ -0,0 +1,21 @@
+// Macro for killing denormalled numbers
+//
+// Written by Jezar at Dreampoint, June 2000
+// http://www.dreampoint.co.uk
+// Based on IS_DENORMAL macro by Jon Watte
+// This code is public domain
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <math.h>
+#include "denormals.h"
+
+/* fpclassify() is C99, cannot be compiled into a C++90 file (on some systems) */
+float undenormalise( float f )
+{
+    if( fpclassify( f ) == FP_SUBNORMAL  )
+        return 0.0;
+    return f;
+}