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.)
This commit is contained in:
Ryan C. Gordon 2018-05-21 11:54:09 -04:00
parent b7e88aaae0
commit 49881861b1
1 changed files with 1 additions and 1 deletions

View File

@ -279,7 +279,7 @@ SDL_Convert_F32_to_S32_Scalar(SDL_AudioCVT *cvt, SDL_AudioFormat format)
if (sample >= 1.0f) { if (sample >= 1.0f) {
*dst = 2147483647; *dst = 2147483647;
} else if (sample <= -1.0f) { } else if (sample <= -1.0f) {
*dst = -2147483648; *dst = (Sint32) -2147483648LL;
} else { } else {
*dst = ((Sint32)(sample * 8388607.0f)) << 8; *dst = ((Sint32)(sample * 8388607.0f)) << 8;
} }