[Scummvm-cvs-logs] CVS: scummvm/sword2/driver d_sound.cpp,1.116,1.117

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Thu Aug 26 00:00:02 CEST 2004


Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32274/sword2/driver

Modified Files:
	d_sound.cpp 
Log Message:
Explicitly cast value to uint32, since there was a report about compilation
problems. Perhaps this will fix it?


Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -d -r1.116 -r1.117
--- d_sound.cpp	25 Aug 2004 06:55:15 -0000	1.116
+++ d_sound.cpp	26 Aug 2004 06:59:15 -0000	1.117
@@ -52,11 +52,11 @@
 #define GetCompressedSign(n)       (((n) >> 3) & 1)
 #define GetCompressedAmplitude(n)  ((n) & 7)
 
-#define BUFFER_SIZE 4096U
+#define BUFFER_SIZE 4096
 
 class CLUInputStream : public AudioStream {
 	File *_file;
-	uint _end_pos;
+	uint32 _end_pos;
 	int16 _outbuf[BUFFER_SIZE];
 	byte _inbuf[BUFFER_SIZE];
 	const int16 *_bufferEnd;
@@ -128,7 +128,7 @@
 void CLUInputStream::refill() {
 	byte *in = _inbuf;
 	int16 *out = _outbuf;
-	uint len_left = _file->read(in, MIN(BUFFER_SIZE, _end_pos - _file->pos()));
+	uint len_left = _file->read(in, MIN((uint32) BUFFER_SIZE, _end_pos - _file->pos()));
 
 	while (len_left > 0) {
 		uint16 delta = GetCompressedAmplitude(*in) << GetCompressedShift(*in);





More information about the Scummvm-git-logs mailing list