From 0afe7af3d599e58336758c3abc500bc3b7808865 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 29 Nov 2006 10:38:07 +0000 Subject: [PATCH] Apparently it's possible that MSVC will want to call a built-in function to bitshift an Sint64, but it can't find this function since we don't use the C runtime on Windows. Division doesn't have this problem, though. Strange. Thanks, Suzuki Masahiro. --- src/audio/SDL_audiocvt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/SDL_audiocvt.c b/src/audio/SDL_audiocvt.c index f77fea45b..fe5669b58 100644 --- a/src/audio/SDL_audiocvt.c +++ b/src/audio/SDL_audiocvt.c @@ -140,14 +140,14 @@ SDL_ConvertMono(SDL_AudioCVT * cvt, SDL_AudioFormat format) const Sint64 added = (((Sint64) (Sint32) SDL_SwapBE32(src[0])) + ((Sint64) (Sint32) SDL_SwapBE32(src[1]))); - *(dst++) = SDL_SwapBE32((Uint32) ((Sint32) (added >> 1))); + *(dst++) = SDL_SwapBE32((Uint32) ((Sint32) (added / 2))); } } else { for (i = cvt->len_cvt / 8; i; --i, src += 2) { const Sint64 added = (((Sint64) (Sint32) SDL_SwapLE32(src[0])) + ((Sint64) (Sint32) SDL_SwapLE32(src[1]))); - *(dst++) = SDL_SwapLE32((Uint32) ((Sint32) (added >> 1))); + *(dst++) = SDL_SwapLE32((Uint32) ((Sint32) (added / 2))); } } }