aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/resource.cpp11
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;
}