]> git.sesse.net Git - vlc/commitdiff
Workaround spatializer bugs.
authorJean-Baptiste Kempf <jb@videolan.org>
Sun, 14 Sep 2008 02:14:02 +0000 (19:14 -0700)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 14 Sep 2008 02:25:11 +0000 (19:25 -0700)
(cherry picked from commit 77cc89e3d9349f3d5a2de947f9be478dd28436dd)
(cherry picked from commit 6d4830b864af38d7126aee103a6bcfe76bc80e89)

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/audio_filter/spatializer/comb.hpp
modules/audio_filter/spatializer/denormals.h

index 8d35e90ce163f22df187cbbccf9d1399f1736d71..71d4ef070e6045be287ee4b711415f6efa557484 100644 (file)
@@ -35,6 +35,13 @@ private:
 
 inline float comb::process(float input)
 {
+
+#if 1
+    /* FIXME FIXME FIXME
+     * comb::process is completly broken so ignore it for now */
+    return 0.0;
+
+#else
     float output;
 
     output = undenormalise( buffer[bufidx] );
@@ -46,6 +53,7 @@ inline float comb::process(float input)
     if(++bufidx>=bufsize) bufidx = 0;
 
     return output;
+#endif
 }
 
 #endif //_comb_
index bab45c6cdb8f6c5cdbd49d16a086f691b4cf6fba..749c7cb1f98917a922c08efb44653dc85974ed70 100644 (file)
 
 #include <stdint.h>
 
+#include <math.h>
+
 static inline float undenormalise( float f )
 {
-    union { float f; uint32_t u; } data;
-    data.f = f;
-    if( (data.u & 0x7f800000) == 0 )
+    if( fpclassify( f ) == FP_SUBNORMAL  )
         return 0.0;
     return f;
 }