diff options
author | Chris Robinson <[email protected]> | 2018-12-22 16:01:14 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-22 16:01:14 -0800 |
commit | 334b3a905a1a387d5fb5f74483a7520bb5d5449a (patch) | |
tree | 8f6aa333bb1b4eecbf9bcfe3f3f972c895345480 /Alc/mixer | |
parent | d4d98e2fe9820f390515baf581dea7dc9bec1431 (diff) |
Clean up some math stuff
Diffstat (limited to 'Alc/mixer')
-rw-r--r-- | Alc/mixer/mixer_c.cpp | 4 | ||||
-rw-r--r-- | Alc/mixer/mixer_neon.cpp | 4 | ||||
-rw-r--r-- | Alc/mixer/mixer_sse.cpp | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/Alc/mixer/mixer_c.cpp b/Alc/mixer/mixer_c.cpp index 99d3e343..7a2a6319 100644 --- a/Alc/mixer/mixer_c.cpp +++ b/Alc/mixer/mixer_c.cpp @@ -2,6 +2,8 @@ #include <assert.h> +#include <limits> + #include "alMain.h" #include "alu.h" #include "alSource.h" @@ -137,7 +139,7 @@ void Mix_C(const ALfloat *data, ALsizei OutChans, ALfloat (*RESTRICT OutBuffer)[ ALfloat gain = CurrentGains[c]; const ALfloat diff = TargetGains[c] - gain; - if(fabsf(diff) > FLT_EPSILON) + if(fabsf(diff) > std::numeric_limits<float>::epsilon()) { ALsizei minsize = mini(BufferSize, Counter); const ALfloat step = diff * delta; diff --git a/Alc/mixer/mixer_neon.cpp b/Alc/mixer/mixer_neon.cpp index f7fe57d1..fa777eac 100644 --- a/Alc/mixer/mixer_neon.cpp +++ b/Alc/mixer/mixer_neon.cpp @@ -2,6 +2,8 @@ #include <arm_neon.h> +#include <limits> + #include "AL/al.h" #include "AL/alc.h" #include "alMain.h" @@ -182,7 +184,7 @@ void Mix_Neon(const ALfloat *data, ALsizei OutChans, ALfloat (*RESTRICT OutBuffe ALfloat gain = CurrentGains[c]; const ALfloat diff = TargetGains[c] - gain; - if(fabsf(diff) > FLT_EPSILON) + if(fabsf(diff) > std::numeric_limits<float>::epsilon()) { ALsizei minsize = mini(BufferSize, Counter); const ALfloat step = diff * delta; diff --git a/Alc/mixer/mixer_sse.cpp b/Alc/mixer/mixer_sse.cpp index 000196ca..f0620cb5 100644 --- a/Alc/mixer/mixer_sse.cpp +++ b/Alc/mixer/mixer_sse.cpp @@ -2,6 +2,8 @@ #include <xmmintrin.h> +#include <limits> + #include "AL/al.h" #include "AL/alc.h" #include "alMain.h" @@ -151,7 +153,7 @@ void Mix_SSE(const ALfloat *data, ALsizei OutChans, ALfloat (*RESTRICT OutBuffer ALfloat gain = CurrentGains[c]; const ALfloat diff = TargetGains[c] - gain; - if(fabsf(diff) > FLT_EPSILON) + if(fabsf(diff) > std::numeric_limits<float>::epsilon()) { ALsizei minsize = mini(BufferSize, Counter); const ALfloat step = diff * delta; |