[Scummvm-cvs-logs] scummvm master -> 45974a1bf03b25cd6a191702b190478cc4c1007e

digitall digitall at scummvm.org
Tue May 22 17:35:37 CEST 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
45974a1bf0 DREAMWEB: Increased debugging output from sound related code.


Commit: 45974a1bf03b25cd6a191702b190478cc4c1007e
    https://github.com/scummvm/scummvm/commit/45974a1bf03b25cd6a191702b190478cc4c1007e
Author: D G Turner (digitall at scummvm.org)
Date: 2012-05-22T08:31:23-07:00

Commit Message:
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.

Changed paths:
    engines/dreamweb/sound.cpp



diff --git a/engines/dreamweb/sound.cpp b/engines/dreamweb/sound.cpp
index 800936e..b3d5db9 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) {






More information about the Scummvm-git-logs mailing list