From e715ccd081bb2df9bec41ca0e55775743967f697 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 28 Dec 2012 05:12:28 +0000 Subject: commit Katya's type-punning fix: https://sourceforge.net/tracker/?func=detail&aid=3598153&group_id=55736&atid=478072 svn path=/trunk/externals/bsaylor/; revision=16783 --- svf~.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/svf~.c b/svf~.c index 8df5a7a..68caa41 100644 --- a/svf~.c +++ b/svf~.c @@ -7,7 +7,7 @@ #include #include "m_pd.h" -#ifdef NT +#ifdef _MSC_VER #define inline __inline #define M_PI 3.14159265358979323846 #pragma warning( disable : 4244 ) @@ -56,9 +56,11 @@ static inline float run_svf(t_svf *sv, float in) { in = sv->qnrm * in ; for (i=0; i < F_R; i++) { // only needed for pentium chips - // OLD VERSION - in = FLUSH_TO_ZERO(in); - sv->l = FLUSH_TO_ZERO(sv->l); + if(PD_BIGORSMALL(in)) in = 0.; + if(PD_BIGORSMALL(sv->l)) sv->l = 0.; + // OLD VERSION + //in = FLUSH_TO_ZERO(in); + //sv->l = FLUSH_TO_ZERO(sv->l); // new versions, thanks to Damon Chaplin, inserted by Ed Kelly, not yet working!!! //in = ((int)in & 0x7f800000)==0?0.0f:in; //sv->l = ((int)sv->l & 0x7f800000)==0?0.0f:sv->l; -- cgit v1.2.1