From 289d1092453ed9fecb610e4f1e55ef8926c94b8d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 14 Jun 2019 16:52:42 -0400 Subject: [PATCH] audio: Attempt to fix build on ARM versions of Visual Studio. --- src/audio/SDL_audiotypecvt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/audio/SDL_audiotypecvt.c b/src/audio/SDL_audiotypecvt.c index 7a0309fa8..309484b44 100644 --- a/src/audio/SDL_audiotypecvt.c +++ b/src/audio/SDL_audiotypecvt.c @@ -1340,7 +1340,11 @@ SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) if (sample >= 1.0f) { *dst = 2147483647; } else if (sample <= -1.0f) { + #ifdef _MSC_VER /* !!! FIXME: bug in Visual Studio? */ + *dst = (-2147483647) - 1; + #else *dst = -2147483648; + #endif } else { *dst = ((Sint32)(sample * 8388607.0f)) << 8; } @@ -1368,7 +1372,11 @@ SDL_Convert_F32_to_S32_NEON(SDL_AudioCVT *cvt, SDL_AudioFormat format) if (sample >= 1.0f) { *dst = 2147483647; } else if (sample <= -1.0f) { + #ifdef _MSC_VER /* !!! FIXME: bug in Visual Studio? */ + *dst = (-2147483647) - 1; + #else *dst = -2147483648; + #endif } else { *dst = ((Sint32)(sample * 8388607.0f)) << 8; }