aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/sound.cpp
diff options
context:
space:
mode:
authorStrangerke2013-01-23 01:38:34 +0100
committerStrangerke2013-01-23 01:38:34 +0100
commit82ecfd537f8cb52701cc05e39457d00ce71ecb59 (patch)
tree09ac263253b3628b0c178f67b9793187fcacdd0e /engines/hopkins/sound.cpp
parent0e0337c30e3b32ae9ab487be8b20ba6a1043c6ef (diff)
downloadscummvm-rg350-82ecfd537f8cb52701cc05e39457d00ce71ecb59.tar.gz
scummvm-rg350-82ecfd537f8cb52701cc05e39457d00ce71ecb59.tar.bz2
scummvm-rg350-82ecfd537f8cb52701cc05e39457d00ce71ecb59.zip
HOPKINS: Some renaming and refactoring in globals, TalkManager and FontsManager
Diffstat (limited to 'engines/hopkins/sound.cpp')
-rw-r--r--engines/hopkins/sound.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/hopkins/sound.cpp b/engines/hopkins/sound.cpp
index 47b2e6827e..3ef1618d8b 100644
--- a/engines/hopkins/sound.cpp
+++ b/engines/hopkins/sound.cpp
@@ -561,6 +561,8 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode) {
}
SDL_LVOICE(filename, catPos, catLen);
+
+ // Reduce music volume during speech
oldMusicVol = _musicVolume;
if (!_musicOffFl && _musicVolume > 2) {
_musicVolume = (signed int)((long double)_musicVolume - (long double)_musicVolume / 100.0 * 45.0);
@@ -588,6 +590,8 @@ bool SoundManager::mixVoice(int voiceId, int voiceMode) {
stopVoice(2);
DEL_SAMPLE_SDL(20);
+
+ // Speech is over, set the music volume back to normal
_musicVolume = oldMusicVol;
if (!_musicOffFl && _musicVolume > 2) {
_vm->_soundManager.MODSetMusicVolume(_vm->_soundManager._musicVolume);