From 49881861b14b73a405868b019ccf0a3cda233291 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 21 May 2018 11:54:09 -0400 Subject: [PATCH] audio: Patched to compile on Visual Studio. (It gets upset at the -2147483648, thinking this should be an unsigned value because 2147483648 is too large for an int32, so the negative sign upsets the compiler.) --- src/audio/SDL_audiotypecvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/SDL_audiotypecvt.c b/src/audio/SDL_audiotypecvt.c index 29cc24d039d2d..38dc5efbd9e25 100644 --- a/src/audio/SDL_audiotypecvt.c +++ b/src/audio/SDL_audiotypecvt.c @@ -279,7 +279,7 @@ SDL_Convert_F32_to_S32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format) if (sample >= 1.0f) { *dst = 2147483647; } else if (sample <= -1.0f) { - *dst = -2147483648; + *dst = (Sint32) -2147483648LL; } else { *dst = ((Sint32)(sample * 8388607.0f)) << 8; }