Skip to content

Commit

Permalink
audio: Patched to compile on Visual Studio.
Browse files Browse the repository at this point in the history
(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.)
  • Loading branch information
icculus committed May 21, 2018
1 parent b7e88aa commit 4988186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/audio/SDL_audiotypecvt.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4988186

Please sign in to comment.