aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorFilippos Karapetis2009-12-21 15:24:43 +0000
committerFilippos Karapetis2009-12-21 15:24:43 +0000
commit11a9351ae53176bb6f2906d35ce21eca61d3a9be (patch)
tree261d272fa446a56d0cad6f19d8ab4ec96b9bda8c /engines
parent35e91fbddf029bd5dc251fda0f695805de315cfd (diff)
downloadscummvm-rg350-11a9351ae53176bb6f2906d35ce21eca61d3a9be.tar.gz
scummvm-rg350-11a9351ae53176bb6f2906d35ce21eca61d3a9be.tar.bz2
scummvm-rg350-11a9351ae53176bb6f2906d35ce21eca61d3a9be.zip
Restored sound volume functionality in the old music code
svn-id: r46466
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/sfx/soundcmd.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/sci/sfx/soundcmd.cpp b/engines/sci/sfx/soundcmd.cpp
index 82e71febbc..6f8cbde265 100644
--- a/engines/sci/sfx/soundcmd.cpp
+++ b/engines/sci/sfx/soundcmd.cpp
@@ -456,6 +456,7 @@ void SoundCommandParser::cmdStopHandle(reg_t obj, int16 value) {
void SoundCommandParser::cmdSuspendHandle(reg_t obj, int16 value) {
if (!obj.segment)
return;
+
#ifdef USE_OLD_MUSIC_FUNCTIONS
if (!_hasNodePtr)
changeHandleStatus(obj, SOUND_STATUS_SUSPENDED);
@@ -511,11 +512,16 @@ void SoundCommandParser::cmdMuteSound(reg_t obj, int16 value) {
}
void SoundCommandParser::cmdVolume(reg_t obj, int16 value) {
- #ifndef USE_OLD_MUSIC_FUNCTIONS
+#ifdef USE_OLD_MUSIC_FUNCTIONS
+ if (obj != SIGNAL_REG)
+ _state->sfx_setVolume(obj.toSint16());
+
+ _acc = make_reg(0, _state->sfx_getVolume());
+#else
if (_argc > 1)
_music->soundSetMasterVolume(obj.toSint16());
_acc = make_reg(0, _music->soundGetMasterVolume());
- #endif
+#endif
}
void SoundCommandParser::cmdFadeHandle(reg_t obj, int16 value) {