[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.324,1.325

Max Horn fingolfin at users.sourceforge.net
Fri Apr 9 18:05:02 CEST 2004


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

Modified Files:
	sound.cpp 
Log Message:
cleanup

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.324
retrieving revision 1.325
diff -u -d -r1.324 -r1.325
--- sound.cpp	10 Apr 2004 00:07:58 -0000	1.324
+++ sound.cpp	10 Apr 2004 00:51:12 -0000	1.325
@@ -852,19 +852,24 @@
 
 	AudioStream *input = NULL;
 	
+	printf("startSfxSound: file_size = %d\n", file_size);
+	
 	switch (_soundMode) {
 	case kMP3Mode:
 #ifdef USE_MAD
+		assert(file_size > 0);
 		input = makeMP3Stream(file, file_size);
 #endif
 		break;
 	case kVorbisMode:
 #ifdef USE_VORBIS
+		assert(file_size > 0);
 		input = makeVorbisStream(file, file_size);
 #endif
 		break;
 	case kFlacMode:
 #ifdef USE_FLAC
+		assert(file_size > 0);
 		input = makeFlacStream(file, file_size);
 #endif
 		break;
@@ -956,10 +961,10 @@
 		size = compressed_offset;
 		cur = _offsetTable;
 		while (size > 0) {
-			cur[0].org_offset = file->readUint32BE();
-			cur[0].new_offset = file->readUint32BE() + compressed_offset + 4; /* The + 4 is to take into accound the 'size' field */
-			cur[0].num_tags = file->readUint32BE();
-			cur[0].compressed_size = file->readUint32BE();
+			cur->org_offset = file->readUint32BE();
+			cur->new_offset = file->readUint32BE() + compressed_offset + 4; /* The + 4 is to take into accound the 'size' field */
+			cur->num_tags = file->readUint32BE();
+			cur->compressed_size = file->readUint32BE();
 			size -= 4 * 4;
 			cur++;
 		}





More information about the Scummvm-git-logs mailing list