diff options
author | Max Horn | 2007-09-23 10:33:30 +0000 |
---|---|---|
committer | Max Horn | 2007-09-23 10:33:30 +0000 |
commit | d19624d3f67b3d849002c3a2591fb907dc1dfaba (patch) | |
tree | f511aa89fa4a46df5cf10e4d50306ac47f4a1e82 | |
parent | eb96cdc6ad46d8b848f60f6703a41317a70e610a (diff) | |
download | scummvm-rg350-d19624d3f67b3d849002c3a2591fb907dc1dfaba.tar.gz scummvm-rg350-d19624d3f67b3d849002c3a2591fb907dc1dfaba.tar.bz2 scummvm-rg350-d19624d3f67b3d849002c3a2591fb907dc1dfaba.zip |
Fix 64 bit issue
svn-id: r29042
-rw-r--r-- | engines/scumm/player_v2.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/engines/scumm/player_v2.cpp b/engines/scumm/player_v2.cpp index 01c077e4bc..4e8ee81486 100644 --- a/engines/scumm/player_v2.cpp +++ b/engines/scumm/player_v2.cpp @@ -833,13 +833,13 @@ void Player_V2::lowPassFilter(int16 *sample, uint len) { void Player_V2::squareGenerator(int channel, int freq, int vol, int noiseFeedback, int16 *sample, uint len) { - int period = _update_step * freq; - long nsample; + int32 period = _update_step * freq; + int32 nsample; if (period == 0) period = _update_step; for (uint i = 0; i < len; i++) { - unsigned int duration = 0; + uint32 duration = 0; if (_timer_output & (1 << channel)) duration += _timer_count[channel]; @@ -867,8 +867,8 @@ void Player_V2::squareGenerator(int channel, int freq, int vol, duration -= _timer_count[channel]; nsample = *sample + - (((signed long) (duration - (1 << (FIXP_SHIFT - 1))) - * (signed long) _volumetable[vol]) >> FIXP_SHIFT); + (((int32) (duration - (1 << (FIXP_SHIFT - 1))) + * (int32) _volumetable[vol]) >> FIXP_SHIFT); /* overflow: clip value */ if (nsample > 0x7fff) nsample = 0x7fff; |