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

waltervn at users.sourceforge.net waltervn at users.sourceforge.net
Wed Jan 13 18:34:42 CET 2010


Revision: 47292
          http://scummvm.svn.sourceforge.net/scummvm/?rev=47292&view=rev
Author:   waltervn
Date:     2010-01-13 17:34:42 +0000 (Wed, 13 Jan 2010)

Log Message:
-----------
SCI: DoSound: when setting volume return previous value, fixes KQ6CD intro.

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

Modified: scummvm/trunk/engines/sci/sound/soundcmd.cpp
===================================================================
--- scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-01-13 15:17:22 UTC (rev 47291)
+++ scummvm/trunk/engines/sci/sound/soundcmd.cpp	2010-01-13 17:34:42 UTC (rev 47292)
@@ -609,12 +609,14 @@
 
 void SoundCommandParser::cmdMasterVolume(reg_t obj, int16 value) {
 #ifdef USE_OLD_MUSIC_FUNCTIONS
+	_acc = make_reg(0, _state->sfx_getVolume());
+
 	if (obj != SIGNAL_REG)
  		_state->sfx_setVolume(obj.toSint16());
-
-	_acc = make_reg(0, _state->sfx_getVolume());
 #else
 	debugC(2, kDebugLevelSound, "cmdMasterVolume: %d", value);
+	_acc = make_reg(0, _music->soundGetMasterVolume());
+
 	if (_argc > 1)	{ // the first parameter is the sound command
 		int vol = CLIP<int16>(obj.toSint16(), 0, kMaxSciVolume);
 		vol = vol * Audio::Mixer::kMaxMixerVolume / kMaxSciVolume;
@@ -622,7 +624,6 @@
 		ConfMan.setInt("sfx_volume", vol);
 		g_engine->syncSoundSettings();
 	}
-	_acc = make_reg(0, _music->soundGetMasterVolume());
 #endif
 }
 


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