[Scummvm-git-logs] scummvm master -> d7d75d97fda6992ef3cf53625445cc5586d7476b

csnover csnover at users.noreply.github.com
Sun Aug 27 01:10:49 CEST 2017


This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
74738489ec SCI32: Fix SFX volume being misapplied to music & speech in some games
ed0d0413b0 SCI32: Allow changing SFX/speech volume in GK2
c0d3d5776e SCI32: Limit existing bad audio map resource skips by language
b17c66981e SCI32: Ignore invalid audio map in GK2 DE
d7d75d97fd SCI32: Ignore invalid audio maps in Phant2 FR


Commit: 74738489ecb19ee104189a378998372b4c6e0535
    https://github.com/scummvm/scummvm/commit/74738489ecb19ee104189a378998372b4c6e0535
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-08-26T18:09:46-05:00

Commit Message:
SCI32: Fix SFX volume being misapplied to music & speech in some games

This was happening in games with game scripts that control the
master volume themselves by applying the master volume to each
channel sent to the kernel, instead of relying on the kernel to
manage the master volume for them.

Changed paths:
    engines/sci/engine/features.h
    engines/sci/sound/audio32.cpp


diff --git a/engines/sci/engine/features.h b/engines/sci/engine/features.h
index 41a4b60..92cc45a 100644
--- a/engines/sci/engine/features.h
+++ b/engines/sci/engine/features.h
@@ -110,6 +110,17 @@ public:
 		}
 	}
 
+	inline bool gameScriptsControlMasterVolume() const {
+		switch (g_sci->getGameId()) {
+		case GID_LSL7:
+		case GID_PHANTASMAGORIA2:
+		case GID_TORIN:
+			return true;
+		default:
+			return false;
+		}
+	}
+
 	inline bool hasSci3Audio() const {
 		return getSciVersion() == SCI_VERSION_3 || g_sci->getGameId() == GID_GK2;
 	}
diff --git a/engines/sci/sound/audio32.cpp b/engines/sci/sound/audio32.cpp
index 7622305..c3f9eb4 100644
--- a/engines/sci/sound/audio32.cpp
+++ b/engines/sci/sound/audio32.cpp
@@ -181,10 +181,18 @@ Audio32::Audio32(ResourceManager *resMan) :
 	}
 
 	_useModifiedAttenuation = g_sci->_features->usesModifiedAudioAttenuation();
-	// The mixer stream type is given as `kSFXSoundType` so that audio from
-	// Audio32 will be mixed at the same standard volume as the video players
-	// (which must use `kSFXSoundType` as well).
-	_mixer->playStream(Audio::Mixer::kSFXSoundType, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
+
+	// In games where scripts premultiply master audio volumes into the volumes
+	// of the individual audio channels sent to the mixer, Audio32 needs to use
+	// the kPlainSoundType so that the master SFX volume is not applied twice.
+	// Otherwise, we simply pass along master volume changes to the ScummVM
+	// mixer for the kSFXSoundType and allow it to control master volume.
+	// (The volume of the kSFXSoundType in the mixer still needs to be updated
+	// for games that control master volumes themselves so that videos will play
+	// at the same volume as the rest of the game.)
+	const Audio::Mixer::SoundType soundType = g_sci->_features->gameScriptsControlMasterVolume() ? Audio::Mixer::kPlainSoundType : Audio::Mixer::kSFXSoundType;
+
+	_mixer->playStream(soundType, &_handle, this, -1, Audio::Mixer::kMaxChannelVolume, 0, DisposeAfterUse::NO, true);
 }
 
 Audio32::~Audio32() {


Commit: ed0d0413b06ff9a257c27f786a63c9ae5a0cb95f
    https://github.com/scummvm/scummvm/commit/ed0d0413b06ff9a257c27f786a63c9ae5a0cb95f
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-08-26T18:09:47-05:00

Commit Message:
SCI32: Allow changing SFX/speech volume in GK2

Originally, changing the SFX volume from ScummVM was disabled
because the game itself only allowed adjustment of music volume,
so adjusting the SFX volume would indirectly affect the music
volume. On reflection, allowing the adjustment of SFX volume even
though this also changes the music volume seems preferable to not
allowing any adjustment of the SFX/speech volumes.

Changed paths:
    engines/sci/detection_tables.h


diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index 91ce678..d4e4a4f 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -843,9 +843,8 @@ static const struct ADGameDescription SciGameDescriptions[] = {
                             GUIO_NOLAUNCHLOAD, \
                             GUIO_NOASPECT, \
                             GAMEOPTION_HQ_VIDEO)
-#define GUIO_GK2      GUIO8(GUIO_NOSUBTITLES, \
-                            GUIO_NOSFX, \
-                            GUIO_NOSPEECHVOLUME, \
+#define GUIO_GK2      GUIO7(GUIO_NOSUBTITLES, \
+                            GUIO_LINKSPEECHTOSFX, \
                             GUIO_NOMIDI, \
                             GUIO_NOASPECT, \
                             GAMEOPTION_ORIGINAL_SAVELOAD, \


Commit: c0d3d5776e5fd976c4fd25c452c719bf5bd6d300
    https://github.com/scummvm/scummvm/commit/c0d3d5776e5fd976c4fd25c452c719bf5bd6d300
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-08-26T18:09:47-05:00

Commit Message:
SCI32: Limit existing bad audio map resource skips by language

Since audio maps change when game speech is localised, it makes
sense to limit audio map skips by language until it turns out that
the same problem exists in more than one language release, so we
do not accidentally skip a map that is bad in one language, but OK
in another language.

Changed paths:
    engines/sci/resource_audio.cpp


diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 9fd5dc0..3484a06 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -482,13 +482,17 @@ int ResourceManager::readAudioMapSCI11(IntMapResourceSource *map) {
 			// and points to garbage in the RESOURCE.AUD. The affected audio36
 			// assets seem to be able to load successfully from one of the later
 			// CDs, so just ignore the map on this disc
-			if (g_sci->getGameId() == GID_PQSWAT && map->_volumeNumber == 1 && map->_mapNumber == 405) {
+			if (g_sci->getGameId() == GID_PQSWAT &&
+				g_sci->getLanguage() == Common::EN_ANY &&
+				map->_volumeNumber == 1 &&
+				map->_mapNumber == 405) {
 				continue;
 			}
 
-			// At least version 1.00 of GK2 has multiple invalid audio36 map
-			// entries on CD 6
+			// At least version 1.00 of the US release of GK2 has multiple
+			// invalid audio36 map entries on CD 6
 			if (g_sci->getGameId() == GID_GK2 &&
+				g_sci->getLanguage() == Common::EN_ANY &&
 				map->_volumeNumber == 6 &&
 				offset + syncSize >= srcSize) {
 


Commit: b17c66981e0213fe1d437a14c724a02c9073dc94
    https://github.com/scummvm/scummvm/commit/b17c66981e0213fe1d437a14c724a02c9073dc94
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-08-26T18:09:47-05:00

Commit Message:
SCI32: Ignore invalid audio map in GK2 DE

Fixes Trac#10143.

Changed paths:
    engines/sci/resource_audio.cpp


diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 3484a06..08f5fb8 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -500,6 +500,17 @@ int ResourceManager::readAudioMapSCI11(IntMapResourceSource *map) {
 				continue;
 			}
 
+			// Map 2020 on CD 1 of the German release of GK2 is invalid. This
+			// content does not appear to ever be used by the game (it does not
+			// even exist in the US release), and there is a correct copy of it
+			// on CD 6, so just ignore the bad copy on CD 1
+			if (g_sci->getGameId() == GID_GK2 &&
+				g_sci->getLanguage() == Common::DE_DEU &&
+				map->_volumeNumber == 1 &&
+				map->_mapNumber == 2020) {
+				continue;
+			}
+
 			addResource(id, src, offset + syncSize, 0, map->getLocationName());
 		}
 	}


Commit: d7d75d97fda6992ef3cf53625445cc5586d7476b
    https://github.com/scummvm/scummvm/commit/d7d75d97fda6992ef3cf53625445cc5586d7476b
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-08-26T18:09:47-05:00

Commit Message:
SCI32: Ignore invalid audio maps in Phant2 FR

Fixes Trac#10049.

Changed paths:
    engines/sci/resource_audio.cpp


diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index 08f5fb8..ddaec1e 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -511,6 +511,16 @@ int ResourceManager::readAudioMapSCI11(IntMapResourceSource *map) {
 				continue;
 			}
 
+			// Map 800 and 4176 contain content that was cut from the game. The
+			// French version of the game includes map files from the US
+			// release, but the audio resources are French so the maps don't
+			// match. Since the content was never used, just ignore these maps
+			// everywhere
+			if (g_sci->getGameId() == GID_PHANTASMAGORIA2 &&
+				(map->_mapNumber == 800 || map->_mapNumber == 4176)) {
+				continue;
+			}
+
 			addResource(id, src, offset + syncSize, 0, map->getLocationName());
 		}
 	}





More information about the Scummvm-git-logs mailing list