[Scummvm-cvs-logs] SF.net SVN: scummvm:[46466] scummvm/trunk/engines/sci/sfx/soundcmd.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Mon Dec 21 16:24:43 CET 2009


Revision: 46466
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46466&view=rev
Author:   thebluegr
Date:     2009-12-21 15:24:43 +0000 (Mon, 21 Dec 2009)

Log Message:
-----------
Restored sound volume functionality in the old music code

Modified Paths:
--------------
    scummvm/trunk/engines/sci/sfx/soundcmd.cpp

Modified: scummvm/trunk/engines/sci/sfx/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/soundcmd.cpp	2009-12-21 15:22:42 UTC (rev 46465)
+++ scummvm/trunk/engines/sci/sfx/soundcmd.cpp	2009-12-21 15:24:43 UTC (rev 46466)
@@ -456,6 +456,7 @@
 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::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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list