[Scummvm-git-logs] scummvm master -> c0209598927cd338d93cd501ef6a4354d06bacdc

dreammaster dreammaster at scummvm.org
Fri Jun 16 01:56:26 CEST 2017


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:
c020959892 TITANIC: Have ship announcements use the speech sound type


Commit: c0209598927cd338d93cd501ef6a4354d06bacdc
    https://github.com/scummvm/scummvm/commit/c0209598927cd338d93cd501ef6a4354d06bacdc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-06-15T19:56:12-04:00

Commit Message:
TITANIC: Have ship announcements use the speech sound type

Changed paths:
    engines/titanic/core/game_object.cpp
    engines/titanic/core/game_object.h
    engines/titanic/game/announce.cpp


diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index b4079f1..3286a6c 100644
--- a/engines/titanic/core/game_object.cpp
+++ b/engines/titanic/core/game_object.cpp
@@ -763,12 +763,14 @@ int CGameObject::playSound(const CString &name, CProximity &prox) {
 	return -1;
 }
 
-int CGameObject::queueSound(const CString &name, uint priorHandle, uint volume, int balance, bool repeated) {
+int CGameObject::queueSound(const CString &name, uint priorHandle, uint volume, int balance, bool repeated,
+		Audio::Mixer::SoundType soundType) {
 	CProximity prox;
 	prox._balance = balance;
 	prox._repeated = repeated;
 	prox._channelVolume = volume;
 	prox._priorSoundHandle = priorHandle;
+	prox._soundType = soundType;
 
 	return playSound(name, prox);
 }
diff --git a/engines/titanic/core/game_object.h b/engines/titanic/core/game_object.h
index 34bdcc7..d4befa8 100644
--- a/engines/titanic/core/game_object.h
+++ b/engines/titanic/core/game_object.h
@@ -229,8 +229,8 @@ protected:
 	 * @param balance		Sound balance (not actually used by original)
 	 * @param repeated		If true, sound will repeat indefinitely
 	 */
-	int queueSound(const CString &name, uint priorHandle, uint volume = 100,
-		int balance = 0, bool repeated = false);
+	int queueSound(const CString &name, uint priorHandle, uint volume = 100, int balance = 0,
+		bool repeated = false, Audio::Mixer::SoundType soundType = Audio::Mixer::kPlainSoundType);
 
 	/**
 	 * Stop a sound
diff --git a/engines/titanic/game/announce.cpp b/engines/titanic/game/announce.cpp
index 16298f7..04b46d5 100644
--- a/engines/titanic/game/announce.cpp
+++ b/engines/titanic/game/announce.cpp
@@ -75,22 +75,28 @@ bool CAnnounce::TimerMsg(CTimerMsg *msg) {
 			"", "", "", "", "", "", ""
 		};
 
+		CProximity prox;
+		prox._soundType = Audio::Mixer::kSpeechSoundType;
+
 		int randVal = _nameIndex ? getRandomNumber(2) : 0;
 		switch (randVal) {
 		case 0:
 		case 1:
-			_soundHandle = playSound("z#189.wav");
+			_soundHandle = playSound("z#189.wav", prox);
 			if (_nameIndex < 20) {
-				queueSound(waveNames1[_nameIndex], _soundHandle);
+				queueSound(waveNames1[_nameIndex], _soundHandle, 100, 0, false,
+					Audio::Mixer::kSpeechSoundType);
 				++_nameIndex;
 			} else {
-				queueSound(waveNames1[1 + getRandomNumber(17)], _soundHandle);
+				queueSound(waveNames1[1 + getRandomNumber(17)], _soundHandle,
+					100, 0, false, Audio::Mixer::kSpeechSoundType);
 			}
 			break;
 
 		case 2:
-			_soundHandle = playSound("z#189.wav");
-			queueSound(waveNames2[1 + getRandomNumber(35)], _soundHandle);
+			_soundHandle = playSound("z#189.wav", prox);
+			queueSound(waveNames2[1 + getRandomNumber(35)], _soundHandle,
+				100, 0, false, Audio::Mixer::kSpeechSoundType);
 			break;
 
 		default:





More information about the Scummvm-git-logs mailing list