ladspa/tap-type-punning-fix.dif

19 lines
465 B
Plaintext

--- tap_utils.h-dist 2004-03-05 15:44:58.000000000 +0100
+++ tap_utils.h 2004-03-05 15:45:53.000000000 +0100
@@ -92,7 +92,14 @@
#define LN_2_2 0.34657359f
-#define FLUSH_TO_ZERO(x) (((*(unsigned int*)&(x))&0x7f800000)==0)?0.0f:(x)
+static inline float FLUSH_TO_ZERO(float fv) {
+ union {
+ float f;
+ int i;
+ } v;
+ v.f = fv;
+ return (v.i & 0x7f800000) == 0 ?0.0f : fv;
+}
#define LIMIT(v,l,u) ((v)<(l)?(l):((v)>(u)?(u):(v)))
#define BIQUAD_TYPE float