[Scummvm-cvs-logs] SF.net SVN: scummvm:[52633] scummvm/trunk/engines/groovie

jvprat at users.sourceforge.net jvprat at users.sourceforge.net
Wed Sep 8 11:37:33 CEST 2010


Revision: 52633
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52633&view=rev
Author:   jvprat
Date:     2010-09-08 09:37:33 +0000 (Wed, 08 Sep 2010)

Log Message:
-----------
GROOVIE: Improve sound handling.

- Obey the mute setting.
- Report the supported music types.

Modified Paths:
--------------
    scummvm/trunk/engines/groovie/detection.cpp
    scummvm/trunk/engines/groovie/groovie.cpp

Modified: scummvm/trunk/engines/groovie/detection.cpp
===================================================================
--- scummvm/trunk/engines/groovie/detection.cpp	2010-09-08 08:26:20 UTC (rev 52632)
+++ scummvm/trunk/engines/groovie/detection.cpp	2010-09-08 09:37:33 UTC (rev 52633)
@@ -54,7 +54,8 @@
 		{
 			"t7g", "",
 			AD_ENTRY1s("script.grv", "d1b8033b40aa67c076039881eccce90d", 16659),
-			Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, Common::GUIO_NONE
+			Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS,
+			Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM
 		},
 		kGroovieT7G, 0
 	},
@@ -64,7 +65,8 @@
 		{
 			"t7g", "",
 			AD_ENTRY1s("T7GMac", "a139540fa2be2247005ccf888b7231e3", 1830783),
-			Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK, Common::GUIO_NONE
+			Common::EN_ANY, Common::kPlatformMacintosh, ADGF_MACRESFORK,
+			Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM
 		},
 		kGroovieT7G, 0
 	},
@@ -78,7 +80,8 @@
 				{ "intro.gjd", 0, NULL, 31711554},
 				{ NULL, 0, NULL, 0}
 			},
-			Common::RU_RUS, Common::kPlatformPC, ADGF_NO_FLAGS, Common::GUIO_NONE
+			Common::RU_RUS, Common::kPlatformPC, ADGF_NO_FLAGS,
+			Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM
 		},
 		kGroovieT7G, 0
 	},
@@ -89,7 +92,8 @@
 		{
 			"11h", "",
 			AD_ENTRY1s("disk.1", "5c0428cd3659fc7bbcd0aa16485ed5da", 227),
-			Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS, Common::GUIO_NONE
+			Common::EN_ANY, Common::kPlatformPC, ADGF_NO_FLAGS,
+			Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM
 		},
 		kGroovieV2, 1
 	},
@@ -99,7 +103,8 @@
 		{
 			"11h", "Demo",
 			AD_ENTRY1s("disk.1", "aacb32ce07e0df2894bd83a3dee40c12", 70),
-			Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, Common::GUIO_NOLAUNCHLOAD
+			Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, Common::GUIO_NOLAUNCHLOAD |
+			Common::GUIO_MIDIADLIB | Common::GUIO_MIDIMT32 | Common::GUIO_MIDIGM
 		},
 		kGroovieV2, 1
 	},

Modified: scummvm/trunk/engines/groovie/groovie.cpp
===================================================================
--- scummvm/trunk/engines/groovie/groovie.cpp	2010-09-08 08:26:20 UTC (rev 52632)
+++ scummvm/trunk/engines/groovie/groovie.cpp	2010-09-08 09:37:33 UTC (rev 52633)
@@ -321,13 +321,18 @@
 }
 
 void GroovieEngine::syncSoundSettings() {
-	_musicPlayer->setUserVolume(ConfMan.getInt("music_volume"));
-	// VDX videos just contain one digital audio track, which can be used for
+	bool mute = ConfMan.getBool("mute");
+
+	// Set the music volume
+	_musicPlayer->setUserVolume(mute ? 0 : ConfMan.getInt("music_volume"));
+
+	// Videos just contain one digital audio track, which can be used for
 	// both SFX or Speech, but the engine doesn't know what they contain, so
 	// we have to use just one volume setting for videos.
 	// We use "speech" because most users will want to change the videos
 	// volume when they can't hear the speech because of the music.
-	_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, ConfMan.getInt("speech_volume"));
+	_mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType,
+		mute ? 0 : ConfMan.getInt("speech_volume"));
 }
 
 bool GroovieEngine::canLoadGameStateCurrently() {


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