diff options
-rw-r--r-- | sound/voc.cpp | 13 |
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; } } |