aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-02 09:25:19 -0700
committerChris Robinson <[email protected]>2018-11-02 09:25:19 -0700
commite20d2cdbce2fd696fa65635aa1242a9b614c05cb (patch)
tree86e0cbe191000825c2ecd9632692c485f9040ade
parent4ec757c1de78241a2094f57d348e795d0e311b0f (diff)
Use HUGE_VALF instead of INFINITY
Older MSVC lacks INFINITY, and we define a HUGE_VALF fallback when needed.
-rw-r--r--Alc/mastering.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Alc/mastering.c b/Alc/mastering.c
index 902ad259..5b02194a 100644
--- a/Alc/mastering.c
+++ b/Alc/mastering.c
@@ -6,6 +6,7 @@
#include "alu.h"
#include "almalloc.h"
#include "static_assert.h"
+#include "math_defs.h"
/* These structures assume BUFFERSIZE is a power of 2. */
@@ -463,7 +464,7 @@ Compressor* CompressorInit(const ALsizei NumChans, const ALuint SampleRate,
if(hold > 0)
{
Comp->Hold = (SlidingHold*)(Comp + 1);
- Comp->Hold->Values[0] = -INFINITY;
+ Comp->Hold->Values[0] = -HUGE_VALF;
Comp->Hold->Expiries[0] = hold;
Comp->Hold->Length = hold;
Comp->Delay = (ALfloat(*)[BUFFERSIZE])(Comp->Hold + 1);