[Scummvm-cvs-logs] SF.net SVN: scummvm:[33181] scummvm/branches/gsoc2008-rtl/engines/ parallaction

cpage88 at users.sourceforge.net cpage88 at users.sourceforge.net
Mon Jul 21 23:11:29 CEST 2008


Revision: 33181
          http://scummvm.svn.sourceforge.net/scummvm/?rev=33181&view=rev
Author:   cpage88
Date:     2008-07-21 21:11:28 +0000 (Mon, 21 Jul 2008)

Log Message:
-----------
Improved GMM sound setting config for Parallaction

Modified Paths:
--------------
    scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp
    scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h
    scummvm/branches/gsoc2008-rtl/engines/parallaction/sound.cpp

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp	2008-07-21 19:46:23 UTC (rev 33180)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/exec_ns.cpp	2008-07-21 21:11:28 UTC (rev 33181)
@@ -538,7 +538,7 @@
 		break;
 
 	case kZoneHear:
-		_soundMan->playSfx(z->u.hear->_name, z->u.hear->_channel, (z->_flags & kFlagsLooping) == kFlagsLooping, 60);
+		_soundMan->playSfx(z->u.hear->_name, z->u.hear->_channel, (z->_flags & kFlagsLooping) == kFlagsLooping);
 		break;
 
 	case kZoneSpeak:

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp	2008-07-21 19:46:23 UTC (rev 33180)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.cpp	2008-07-21 21:11:28 UTC (rev 33181)
@@ -139,6 +139,7 @@
 	_debugger = new Debugger(this);
 
 	setupBalloonManager();
+	syncSoundSettings();
 
 	return 0;
 }
@@ -505,6 +506,11 @@
 	return;
 }
 
+void Parallaction::syncSoundSettings() {
+	_mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume"));
+	_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume") / 6);
+	_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume"));
+}
 
 enum {
 	WALK_LEFT = 0,

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h	2008-07-21 19:46:23 UTC (rev 33180)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/parallaction.h	2008-07-21 21:11:28 UTC (rev 33181)
@@ -270,6 +270,8 @@
 	void		pauseJobs();
 	void		resumeJobs();
 
+	virtual void 	syncSoundSettings();
+
 	void		finalizeWalk(Character &character);
 	int16		selectWalkFrame(Character &character, const Common::Point& pos, const WalkNodePtr to);
 	void		clipMove(Common::Point& pos, const Common::Point& to);

Modified: scummvm/branches/gsoc2008-rtl/engines/parallaction/sound.cpp
===================================================================
--- scummvm/branches/gsoc2008-rtl/engines/parallaction/sound.cpp	2008-07-21 19:46:23 UTC (rev 33180)
+++ scummvm/branches/gsoc2008-rtl/engines/parallaction/sound.cpp	2008-07-21 21:11:28 UTC (rev 33181)
@@ -387,7 +387,8 @@
 		rate = ch->header.samplesPerSec;
 	}
 
-	_mixer->playRaw(Audio::Mixer::kSFXSoundType, &ch->handle, ch->data, ch->dataSize, rate, flags, -1, volume, 0, loopStart, loopEnd);
+	_mixer->playRaw(Audio::Mixer::kSFXSoundType, &ch->handle, ch->data, ch->dataSize, rate, flags, -1, 
+			Audio::Mixer::kMaxChannelVolume, 0, loopStart, loopEnd);
 }
 
 void AmigaSoundMan::stopSfx(uint channel) {


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