aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2012-05-22 16:31:23 +0100
committerD G Turner2012-05-22 16:31:23 +0100
commit45974a1bf03b25cd6a191702b190478cc4c1007e (patch)
treebfedb52ba6ef03cd2bfc73a8a22cea980f3fb3cf
parenta1554b9ddd719efc97cbf344fe84d20416810b0b (diff)
downloadscummvm-rg350-45974a1bf03b25cd6a191702b190478cc4c1007e.tar.gz
scummvm-rg350-45974a1bf03b25cd6a191702b190478cc4c1007e.tar.bz2
scummvm-rg350-45974a1bf03b25cd6a191702b190478cc4c1007e.zip
DREAMWEB: Increased debugging output from sound related code.
This code is intended as temporary debugging code to aid investigation of bug #3528164 - "DREAMWEB: missing sound effects/music cues during main title" and can be removed once this bug is fixed.
-rw-r--r--engines/dreamweb/sound.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index 800936e8e8..b3d5db9e0d 100644
--- a/engines/dreamweb/sound.cpp
+++ b/engines/dreamweb/sound.cpp
@@ -55,6 +55,7 @@ void DreamWebEngine::volumeAdjust() {
}
void DreamWebEngine::playChannel0(uint8 index, uint8 repeat) {
+ debug(1, "playChannel0(index:%d, repeat:%d)", index, repeat);
_channel0Playing = index;
if (index >= 12)
index -= 12;
@@ -72,6 +73,7 @@ void DreamWebEngine::playChannel1(uint8 index) {
}
void DreamWebEngine::cancelCh0() {
+ debug(1, "cancelCh0()");
_channel0Repeat = 0;
_channel0Playing = 255;
stopSound(0);
@@ -83,6 +85,7 @@ void DreamWebEngine::cancelCh1() {
}
void DreamWebEngine::loadRoomsSample() {
+ debug(1, "loadRoomsSample() _roomsSample:%d", _roomsSample);
uint8 sample = _roomsSample;
if (sample == 255 || _currentSample == sample)
@@ -190,6 +193,11 @@ bool DreamWebEngine::loadSpeech(const Common::String &filename) {
}
void DreamWebEngine::soundHandler() {
+ static uint8 volumeOld = 0, channel0Old = 0, channel0PlayingOld = 0;
+ if (_volume != volumeOld || _channel0 != channel0Old || _channel0Playing != channel0PlayingOld)
+ debug(1, "soundHandler() _volume: %d _channel0: %d _channel0Playing: %d", _volume, _channel0, _channel0Playing);
+ volumeOld = _volume, channel0Old = _channel0, channel0PlayingOld = _channel0Playing;
+
_subtitles = ConfMan.getBool("subtitles");
volumeAdjust();
@@ -230,6 +238,8 @@ void DreamWebEngine::soundHandler() {
}
}
if (!_mixer->isSoundHandleActive(_channelHandle[0])) {
+ if (_channel0Playing != 255 && _channel0 != 0)
+ debug(1, "!_mixer->isSoundHandleActive _channelHandle[0] _channel0Playing:%d _channel0:%d", _channel0Playing, _channel0);
_channel0Playing = 255;
_channel0 = 0;
}
@@ -237,7 +247,6 @@ void DreamWebEngine::soundHandler() {
_channel1Playing = 255;
_channel1 = 0;
}
-
}
void DreamWebEngine::loadSounds(uint bank, const Common::String &suffix) {