diff options
-rw-r--r-- | Alc/effects/pshifter.c | 2 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/Alc/effects/pshifter.c b/Alc/effects/pshifter.c index 7411f705..9c2bb2e9 100644 --- a/Alc/effects/pshifter.c +++ b/Alc/effects/pshifter.c @@ -125,7 +125,7 @@ static inline ALint double2int(ALdouble d) if(UNLIKELY(shift >= 63 || shift < -52)) return 0; - mant = (conv.i64&U64(0xfffffffffffff)) | U64(0x10000000000000); + mant = (conv.i64&I64(0xfffffffffffff)) | I64(0x10000000000000); if(LIKELY(shift < 0)) return (ALint)(mant >> -shift) * sign; return (ALint)(mant << shift) * sign; diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 14deb227..886f3ab1 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -115,6 +115,16 @@ typedef ALuint64SOFT ALuint64; #endif #endif +#ifndef I64 +#if defined(_MSC_VER) +#define I64(x) ((ALint64)(x##i64)) +#elif SIZEOF_LONG == 8 +#define I64(x) ((ALint64)(x##l)) +#elif SIZEOF_LONG_LONG == 8 +#define I64(x) ((ALint64)(x##ll)) +#endif +#endif + /* Define a CTZ64 macro (count trailing zeros, for 64-bit integers). The result * is *UNDEFINED* if the value is 0. */ |