[Scummvm-git-logs] scummvm master -> 8ba71d0a0f4ba4870755b748ffb9876277370363

elasota noreply at scummvm.org
Mon Sep 19 00:17:01 UTC 2022


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

Summary:
8ba71d0a0f MTROPOLIS: Flatten QuickTime edit lists in Obsidian.


Commit: 8ba71d0a0f4ba4870755b748ffb9876277370363
    https://github.com/scummvm/scummvm/commit/8ba71d0a0f4ba4870755b748ffb9876277370363
Author: elasota (ejlasota at gmail.com)
Date: 2022-09-18T20:12:17-04:00

Commit Message:
MTROPOLIS: Flatten QuickTime edit lists in Obsidian.

Changed paths:
    engines/mtropolis/elements.cpp
    engines/mtropolis/hacks.cpp
    engines/mtropolis/hacks.h


diff --git a/engines/mtropolis/elements.cpp b/engines/mtropolis/elements.cpp
index cd50528933d..51e73904b44 100644
--- a/engines/mtropolis/elements.cpp
+++ b/engines/mtropolis/elements.cpp
@@ -576,6 +576,8 @@ void MovieElement::activate() {
 	if (!_videoDecoder->loadStream(movieDataStream))
 		_videoDecoder.reset();
 
+	if (_runtime->getHacks().removeQuickTimeEdits)
+		qtDecoder->flattenEditLists();
 	_timeScale = qtDecoder->getTimeScale();
 
 	_unloadSignaller = project->notifyOnSegmentUnload(segmentIndex, this);
diff --git a/engines/mtropolis/hacks.cpp b/engines/mtropolis/hacks.cpp
index cd7ba4c0c97..f04d87fcdb5 100644
--- a/engines/mtropolis/hacks.cpp
+++ b/engines/mtropolis/hacks.cpp
@@ -37,6 +37,7 @@ namespace MTropolis {
 
 Hacks::Hacks() {
 	ignoreMismatchedProjectNameInObjectLookups = false;
+	removeQuickTimeEdits = false;
 	midiVolumeScale = 256;
 	minTransitionDuration = 0;
 }
@@ -395,7 +396,15 @@ void ObsidianSaveScreenshotHooks::onSceneTransitionSetup(Runtime *runtime, const
 }
 
 void addObsidianQuirks(const MTropolisGameDescription &desc, Hacks &hacks) {
+	// Add screenshot hook to store savegame screenshot prior to going to the menu
 	hacks.addSceneTransitionHooks(Common::SharedPtr<SceneTransitionHooks>(new ObsidianSaveScreenshotHooks()));
+
+	// Strip edit lists from QuickTime movies to work around audio popping problem.
+	// For some reason, some vidbots (like the cube maze entry bot) have edit lists
+	// in the audio track full of half-second edits, but the edit offsets are spaced
+	// 22080 samples apart instead of 22050, which causes it to skip 30 audio samples
+	// every half-second.
+	hacks.removeQuickTimeEdits = true;
 }
 
 void addObsidianBugFixes(const MTropolisGameDescription &desc, Hacks &hacks) {
diff --git a/engines/mtropolis/hacks.h b/engines/mtropolis/hacks.h
index 94683e1cae8..dcb8758319b 100644
--- a/engines/mtropolis/hacks.h
+++ b/engines/mtropolis/hacks.h
@@ -49,6 +49,7 @@ struct Hacks {
 	void addSaveLoadMechanismHooks(const Common::SharedPtr<SaveLoadMechanismHooks> &hooks);
 
 	bool ignoreMismatchedProjectNameInObjectLookups;
+	bool removeQuickTimeEdits;
 	uint midiVolumeScale;	// 256 = 1.0
 
 	uint32 minTransitionDuration;




More information about the Scummvm-git-logs mailing list