changeset 2078:f932ac47a331

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.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 29 Nov 2006 10:38:07 +0000
parents 8bfba7ec379a
children 1ed2155b7ee4
files src/audio/SDL_audiocvt.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/audio/SDL_audiocvt.c	Wed Nov 29 10:34:05 2006 +0000
+++ b/src/audio/SDL_audiocvt.c	Wed Nov 29 10:38:07 2006 +0000
@@ -140,14 +140,14 @@
                     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)));
                 }
             }
         }