Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Apparently it's possible that MSVC will want to call a built-in funct…
…ion 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.
  • Loading branch information
icculus committed Nov 29, 2006
1 parent a9670ad commit 0afe7af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/audio/SDL_audiocvt.c
Expand Up @@ -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)));
}
}
}
Expand Down

0 comments on commit 0afe7af

Please sign in to comment.