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

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Sun Oct 16 23:32:02 CEST 2005


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

Modified Files:
	d_sound.cpp 
Log Message:
Fixed off-by-one error when decoding the original sound files. I thought I
had already done this, but I guess not...


Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- d_sound.cpp	16 Oct 2005 13:31:57 -0000	1.157
+++ d_sound.cpp	17 Oct 2005 06:31:10 -0000	1.158
@@ -107,9 +107,10 @@
 		for (uint32 cnt = 0; cnt < fh->idxLen; cnt++) {
 			fh->idxTab[cnt * 3 + 0] = fh->file->readUint32LE();
 			fh->idxTab[cnt * 3 + 1] = fh->file->readUint32LE();
-			if (fh->fileType == kCLUMode)
+			if (fh->fileType == kCLUMode) {
 				fh->idxTab[cnt * 3 + 2] = fh->idxTab[cnt * 3 + 1];
-			else
+				fh->idxTab[cnt * 3 + 1]--;
+			} else
 				fh->idxTab[cnt * 3 + 2] = fh->file->readUint32LE();
 		}
 	}
@@ -296,7 +297,7 @@
 		len_left = _samplesLeft;
 
 	if (!_looping) {
-		// None-looping music is faded out at the end. If this fade
+		// Non-looping music is faded out at the end. If this fade
 		// out would have started somewhere within the len_left samples
 		// to read, we only read up to that point. This way, we can
 		// treat this fade as any other.





More information about the Scummvm-git-logs mailing list