From 21c87385bc53c5d4d9cdcee928ead8719033591c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 19 Mar 2009 19:17:29 +0000 Subject: [PATCH] Added some more debug messages svn-id: r39532 --- engines/tinsel/music.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/engines/tinsel/music.cpp b/engines/tinsel/music.cpp index 51ae012e3de..699765490fa 100644 --- a/engines/tinsel/music.cpp +++ b/engines/tinsel/music.cpp @@ -839,6 +839,10 @@ bool PCMMusicPlayer::getNextChunk() { if (file.read(buffer, sampleCLength) != sampleCLength) error(FILE_IS_CORRUPT, _fileName); + debugC(DEBUG_DETAILED, kTinselDebugMusic, "Creating ADPCM music chunk with size %d, " + "offset %d (script %d.%d)", sampleCLength, sampleOffset, + _scriptNum, _scriptIndex - 1); + sampleStream = new Common::MemoryReadStream(buffer, sampleCLength, true); delete _curChunk; @@ -849,6 +853,9 @@ bool PCMMusicPlayer::getNextChunk() { return true; case S_END1: + debugC(DEBUG_DETAILED, kTinselDebugMusic, "Music reached state S_END1 (script %d.%d)", + _scriptNum, _scriptIndex); + script = scriptBuffer = (int32 *) LockMem(_hScript); id = _scriptNum; @@ -869,10 +876,16 @@ bool PCMMusicPlayer::getNextChunk() { return true; case S_END2: + debugC(DEBUG_DETAILED, kTinselDebugMusic, "Music reached state S_END2 (script %d.%d)", + _scriptNum, _scriptIndex); + _silenceSamples = 11025; // Half a second of silence return true; case S_END3: + debugC(DEBUG_DETAILED, kTinselDebugMusic, "Music reached state S_END3 (script %d.%d)", + _scriptNum, _scriptIndex); + stop(); _state = S_IDLE; return false;