aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Alc/effects/reverb.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Alc/effects/reverb.c b/Alc/effects/reverb.c
index 504e35b7..5ec5f6cf 100644
--- a/Alc/effects/reverb.c
+++ b/Alc/effects/reverb.c
@@ -241,6 +241,21 @@ static const ALfloat LATE_LINE_LENGTH[4] =
static const ALfloat LATE_LINE_MULTIPLIER = 4.0f;
+#if defined(_WIN32) && !defined (_M_X64) && !defined(_M_ARM)
+/* HACK: Workaround for a modff bug in 32-bit Windows, which attempts to write
+ * a 64-bit double to the 32-bit float parameter.
+ */
+static inline float hack_modff(float x, float *y)
+{
+ double di;
+ double df = modf((double)x, &di);
+ *y = (float)di;
+ return (float)df;
+}
+#define modff hack_modff
+#endif
+
+
/**************************************
* Device Update *
**************************************/