]> git.sesse.net Git - vlc/blob - modules/audio_filter/spatializer/denormals.c
Rename audio filter2 capability back to audio filter
[vlc] / modules / audio_filter / spatializer / denormals.c
1 // Macro for killing denormalled numbers
2 //
3 // Written by Jezar at Dreampoint, June 2000
4 // http://www.dreampoint.co.uk
5 // Based on IS_DENORMAL macro by Jon Watte
6 // This code is public domain
7
8 #ifdef HAVE_CONFIG_H
9 # include <config.h>
10 #endif
11
12 #include <math.h>
13 #include "denormals.h"
14
15 /* fpclassify() is C99, cannot be compiled into a C++90 file (on some systems) */
16 float undenormalise( float f )
17 {
18     if( fpclassify( f ) == FP_SUBNORMAL  )
19         return 0.0;
20     return f;
21 }