aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-11-02 21:42:21 +0000
committerMax Horn2009-11-02 21:42:21 +0000
commit400ee8c461e8060393b62be639c27dd3820dccd4 (patch)
tree3c68478d725f392bc8580f6ccdd2f0644ea62351
parent3a2833867f2f8f720afb5e89180a95d1aa4b3236 (diff)
downloadscummvm-rg350-400ee8c461e8060393b62be639c27dd3820dccd4.tar.gz
scummvm-rg350-400ee8c461e8060393b62be639c27dd3820dccd4.tar.bz2
scummvm-rg350-400ee8c461e8060393b62be639c27dd3820dccd4.zip
Enhance VOC debug output
svn-id: r45615
-rw-r--r--sound/voc.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/voc.cpp b/sound/voc.cpp
index a5bab0af29..9179f5e7e5 100644
--- a/sound/voc.cpp
+++ b/sound/voc.cpp
@@ -52,6 +52,8 @@ int getSampleRateFromVOCRate(int vocSR) {
static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate, int &loops, int &begin_loop, int &end_loop) {
VocFileHeader fileHeader;
+ debug(2, "loadVOCFromStream");
+
if (stream.read(&fileHeader, 8) != 8)
goto invalid;
@@ -92,6 +94,8 @@ static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate,
len |= stream.readByte() << 8;
len |= stream.readByte() << 16;
+ debug(2, "Block code %d, len %d", code, len);
+
switch (code) {
case 1:
case 9: {
@@ -153,7 +157,7 @@ static byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate,
stream.readByte();
break;
default:
- warning("Unhandled code in VOC file : %d", code);
+ warning("Unhandled code %d in VOC file (len %d)", code, len);
return ret_sound;
}
}
@@ -174,6 +178,9 @@ int parseVOCFormat(Common::SeekableReadStream& stream, LinearDiskStreamAudioBloc
int currentBlock = 0;
int size = 0;
+ debug(2, "parseVOCFormat");
+
+
if (stream.read(&fileHeader, 8) != 8)
goto invalid;
@@ -213,6 +220,8 @@ int parseVOCFormat(Common::SeekableReadStream& stream, LinearDiskStreamAudioBloc
len |= stream.readByte() << 8;
len |= stream.readByte() << 16;
+ debug(2, "Block code %d, len %d", code, len);
+
switch (code) {
case 1:
case 9: {
@@ -276,7 +285,7 @@ int parseVOCFormat(Common::SeekableReadStream& stream, LinearDiskStreamAudioBloc
stream.readByte();
break;
default:
- warning("Unhandled code in VOC file : %d", code);
+ warning("Unhandled code %d in VOC file (len %d)", code, len);
return 0;
}
}