From d19624d3f67b3d849002c3a2591fb907dc1dfaba Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 23 Sep 2007 10:33:30 +0000 Subject: Fix 64 bit issue svn-id: r29042 --- engines/scumm/player_v2.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/scumm/player_v2.cpp') 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; -- cgit v1.2.3