diff options
author | Ed Kelly <edkelly@users.sourceforge.net> | 2009-08-15 00:26:13 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 13:36:00 +0200 |
commit | d4f8c8a4b1897d884e10312f7b6f4e100e8f8a32 (patch) | |
tree | 4a5063c87f2d7603c504edf1dbecb5afbef973b9 | |
parent | ecf0f4511d95e41d67cfbbfefd08598f129fb03a (diff) |
Fixed the denormals in the C code
svn path=/trunk/externals/bsaylor/; revision=11916
-rw-r--r-- | svf~.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -18,7 +18,7 @@ #define F_R 3
// Denormalise floats, only actually needed for PIII and very recent PowerPC
-#define FLUSH_TO_ZERO(fv) (((*(unsigned int*)&(fv))&0x7f800000)==0)?0.0f:(fv)
+//#define FLUSH_TO_ZERO(fv) (((*(unsigned int*)&(fv))&0x7f800000)==0)?0.0f:(fv)
/* pd's samplerate */
float fs;
@@ -56,8 +56,8 @@ 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
- in = FLUSH_TO_ZERO(in);
- sv->l = FLUSH_TO_ZERO(sv->l);
+ in = ((int)in & 0x7f800000)==0?0.0f:in;
+ sv->l = ((int)sv->l & 0x7f800000)==0?0.0f:sv->l;
// very slight waveshape for extra stability
sv->b = sv->b - sv->b * sv->b * sv->b * 0.001f;
|