[Scummvm-cvs-logs] SF.net SVN: scummvm: [29042] scummvm/trunk/engines/scumm/player_v2.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sun Sep 23 12:33:31 CEST 2007


Revision: 29042
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29042&view=rev
Author:   fingolfin
Date:     2007-09-23 03:33:30 -0700 (Sun, 23 Sep 2007)

Log Message:
-----------
Fix 64 bit issue

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/player_v2.cpp

Modified: scummvm/trunk/engines/scumm/player_v2.cpp
===================================================================
--- scummvm/trunk/engines/scumm/player_v2.cpp	2007-09-23 10:24:05 UTC (rev 29041)
+++ scummvm/trunk/engines/scumm/player_v2.cpp	2007-09-23 10:33:30 UTC (rev 29042)
@@ -833,13 +833,13 @@
 
 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 @@
 			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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list