_mental_ wrote:This is yet another issue with MinGW code generation involving SSE instructions. This time the game doesn't crash but screw up floating point values.
When I replaced supplied OpenAL Soft 1.18.1 DLL with the same version but built by MSVC 2015 the error is gone.
There was a fairly nasty bug in 1.18.1 that caused the FPU rounding mode to get modified on the caller's threads, which was fixed in 1.18.2. It for sure affected the MinGW-w64 builds, but I'm not sure if it also affected MSVC (the fegetenv/fesetenv functions provided by MinGW fail to save/restore the rounding mode like the standard says it's supposed to; I don't know if MSVC's versions of those functions have the same flaw and MinGW was just replicating it for compatibility, or if it is a real bug on their end).
I don't know why it would only affect the 32-bit version though, or what exactly is being tripped. Invalid Value suggests a value is out of range, but (G)ZDoom is careful to clamp the reverb property values to the same limits OpenAL will check against, so it should be able to be out of range regardless. I can only guess that maybe 32-bit MinGW generates slightly different float values for the min and max constants than 32-bit MSVC (without support for C99's hex floats, almost any specified floating-point value that's not a whole number will be inexact and need conversion to some bit representation), so even though the MSVC code clamps it, the MinGW code could be one bit stricter on something so it's seen as out of range. That's just a guess, though.