[Scummvm-cvs-logs] scummvm master -> 08c8d3ca1014a8242b6162b9d3f637ad601bf9ec

whoozle whoozle at yandex.ru
Sat Jun 25 16:48:27 CEST 2011


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:
08c8d3ca10 DREAMWEB: Minor cleanup in playSound, added kSpeechSoundType for speech


Commit: 08c8d3ca1014a8242b6162b9d3f637ad601bf9ec
    https://github.com/scummvm/scummvm/commit/08c8d3ca1014a8242b6162b9d3f637ad601bf9ec
Author: Vladimir Menshakov (whoozle at yandex.ru)
Date: 2011-06-25T07:46:10-07:00

Commit Message:
DREAMWEB: Minor cleanup in playSound, added kSpeechSoundType for speech

Changed paths:
    engines/dreamweb/dreamweb.cpp



diff --git a/engines/dreamweb/dreamweb.cpp b/engines/dreamweb/dreamweb.cpp
index 5d54f73..eebadfd 100644
--- a/engines/dreamweb/dreamweb.cpp
+++ b/engines/dreamweb/dreamweb.cpp
@@ -420,17 +420,21 @@ void DreamWebEngine::cls() {
 
 void DreamWebEngine::playSound(uint8 channel, uint8 id, uint8 loops) {
 	debug(1, "playSound(%u, %u, %u)", channel, id, loops);
-	const SoundData &data = _soundData[id >= 12? 1: 0];
 
-	Audio::Mixer::SoundType type;
-	bool speech = id == 62; //actually 50
+	int bank = 0;
+	bool speech = false;
+	Audio::Mixer::SoundType type = channel == 0?
+		Audio::Mixer::kMusicSoundType: Audio::Mixer::kSFXSoundType;
+
 	if (id >= 12) {
 		id -= 12;
-		type = Audio::Mixer::kSFXSoundType;
-	} else if (speech)
-		type = Audio::Mixer::kSpeechSoundType;
-	else
-		type = Audio::Mixer::kMusicSoundType;
+		bank = 1;
+		if (id == 50) {
+			speech = true;
+			type = Audio::Mixer::kSpeechSoundType;
+		}
+	}
+	const SoundData &data = _soundData[bank];
 
 	Audio::SeekableAudioStream *raw;
 	if (!speech) {






More information about the Scummvm-git-logs mailing list