aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/titanic/core/game_object.cpp4
-rw-r--r--engines/titanic/core/game_object.h4
-rw-r--r--engines/titanic/game/announce.cpp16
3 files changed, 16 insertions, 8 deletions
diff --git a/engines/titanic/core/game_object.cpp b/engines/titanic/core/game_object.cpp
index b4079f1c19..3286a6c7ee 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 34bdcc7057..d4befa8fc8 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 16298f7b99..04b46d5910 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: