[Scummvm-cvs-logs] SF.net SVN: scummvm:[47600] scummvm/trunk/engines/sci/resource.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Jan 27 16:06:48 CET 2010


Revision: 47600
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47600&view=rev
Author:   thebluegr
Date:     2010-01-27 15:06:47 +0000 (Wed, 27 Jan 2010)

Log Message:
-----------
Turned the asserts about the unknown sound field into a warning

Modified Paths:
--------------
    scummvm/trunk/engines/sci/resource.cpp

Modified: scummvm/trunk/engines/sci/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/resource.cpp	2010-01-27 14:10:19 UTC (rev 47599)
+++ scummvm/trunk/engines/sci/resource.cpp	2010-01-27 15:06:47 UTC (rev 47600)
@@ -2050,8 +2050,15 @@
 						_tracks[trackNr].digitalChannelNr = channelNr;
 						_tracks[trackNr].digitalSampleRate = READ_LE_UINT16(channel->data);
 						_tracks[trackNr].digitalSampleSize = READ_LE_UINT16(channel->data + 2);
-						assert(READ_LE_UINT16(channel->data + 4) == 0); // Possibly a compression flag
-						//assert(READ_LE_UINT16(channelData + 6) == size);
+						uint16 unk2 = READ_LE_UINT16(channel->data + 4);
+						uint16 unkSize = READ_LE_UINT16(channel->data + 6);
+						if (unk2 != 0)
+							warning("Unknown sound field isn't 0 (it's %d), "
+									"sound might be compressed. Sound size: %d, "
+									"unknown size: %d", unk2, _tracks[trackNr].digitalSampleSize, unkSize);
+
+						//assert(READ_LE_UINT16(channel->data + 4) == 0); // Possibly a compression flag
+						//assert(READ_LE_UINT16(channelData + 6) == size - 1);
 						channel->data += 8; // Skip over header
 						channel->size -= 8;
 					}


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