diff options
author | Filippos Karapetis | 2010-01-27 15:06:47 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-01-27 15:06:47 +0000 |
commit | 0f0e123e5ab5bb49cc6842800edf96b527128710 (patch) | |
tree | 1e5f0576b3daf1a4ece7d67fb85a6a240027eb3f /engines/sci | |
parent | ae7696e5f19555178056109514defaf27f49938e (diff) | |
download | scummvm-rg350-0f0e123e5ab5bb49cc6842800edf96b527128710.tar.gz scummvm-rg350-0f0e123e5ab5bb49cc6842800edf96b527128710.tar.bz2 scummvm-rg350-0f0e123e5ab5bb49cc6842800edf96b527128710.zip |
Turned the asserts about the unknown sound field into a warning
svn-id: r47600
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/resource.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp index 36f1689e2e..81b8359655 100644 --- a/engines/sci/resource.cpp +++ b/engines/sci/resource.cpp @@ -2050,8 +2050,15 @@ SoundResource::SoundResource(uint32 resNumber, ResourceManager *resMan, SciVersi _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; } |