[Scummvm-cvs-logs] CVS: tools compress_sword2.c,1.5,1.6

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Mon Aug 15 09:56:01 CEST 2005


Update of /cvsroot/scummvm/tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20736

Modified Files:
	compress_sword2.c 
Log Message:
Fixed long-standing error in sound decompression that would cause a slight
pop at the end of some sounds because it was trying to decode one sample
too many.


Index: compress_sword2.c
===================================================================
RCS file: /cvsroot/scummvm/tools/compress_sword2.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- compress_sword2.c	9 Jun 2005 12:38:44 -0000	1.5
+++ compress_sword2.c	15 Aug 2005 15:40:39 -0000	1.6
@@ -215,6 +215,13 @@
 			}
 
 			/*
+			 * The number of decodeable 16-bit samples is one less
+			 * than the length of the resource.
+			 */
+
+			length--;
+
+			/*
 			 * Our encoding function assumes that raw data means
 			 * 8-bit data. Rather than going through the trouble of
 			 * adding support for 16-bit data at various byte





More information about the Scummvm-git-logs mailing list