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

NMIError 60350957+NMIError at users.noreply.github.com
Fri Sep 10 13:02:58 UTC 2021


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

Summary:
be5d8f2b0c AGS: Fix hanging sustained notes
f9630d6981 AGS: Fix MIDI volume control


Commit: be5d8f2b0ca33221d2c98456ea57661e22591596
    https://github.com/scummvm/scummvm/commit/be5d8f2b0ca33221d2c98456ea57661e22591596
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-09-10T14:46:58+02:00

Commit Message:
AGS: Fix hanging sustained notes

Some AGS games (f.e. 5 Days A Stranger) use sustain controller events in their
MIDI data. When stopping playback in the middle of a track, sustained notes
will hang unless sustain is turned off. This commit fixes this issue by turning
on the "send sustain off on notes off" option of the MIDI parser. This fixes
issue #12905.

Changed paths:
    engines/ags/music.cpp


diff --git a/engines/ags/music.cpp b/engines/ags/music.cpp
index 9d43e78e17..665a802a99 100644
--- a/engines/ags/music.cpp
+++ b/engines/ags/music.cpp
@@ -77,6 +77,7 @@ void Music::playMusic(Common::SeekableReadStream *midi, bool repeat) {
 		parser->setMidiDriver(this);
 		parser->setTimerRate(_driver->getBaseTempo());
 		parser->property(MidiParser::mpCenterPitchWheelOnUnload, 1);
+		parser->property(MidiParser::mpSendSustainOffOnNotesOff, true);
 
 		_parser = parser;
 


Commit: f9630d6981fa9747804f4cb0346950cc681b578e
    https://github.com/scummvm/scummvm/commit/f9630d6981fa9747804f4cb0346950cc681b578e
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-09-10T15:02:27+02:00

Commit Message:
AGS: Fix MIDI volume control

MIDI user volume setting was not applied until the start of the next track.
Fixed this by implementing Engine::syncSoundSettings.

Changed paths:
    engines/ags/ags.cpp
    engines/ags/ags.h
    engines/ags/music.cpp


diff --git a/engines/ags/ags.cpp b/engines/ags/ags.cpp
index f8feb817fc..7cdd72b6f6 100644
--- a/engines/ags/ags.cpp
+++ b/engines/ags/ags.cpp
@@ -274,4 +274,11 @@ void AGSEngine::GUIError(const Common::String &msg) {
 	GUIErrorMessage(msg);
 }
 
+void AGSEngine::syncSoundSettings() {
+	// Digital audio
+	Engine::syncSoundSettings();
+	// MIDI
+	_music->syncVolume();
+}
+
 } // namespace AGS
diff --git a/engines/ags/ags.h b/engines/ags/ags.h
index c7e4f27865..cd0c5648f4 100644
--- a/engines/ags/ags.h
+++ b/engines/ags/ags.h
@@ -166,6 +166,11 @@ public:
 	 * Save a savegame
 	 */
 	Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
+
+	/**
+	 * Synchronize user volume settings
+	 */
+	void syncSoundSettings() override;
 };
 
 extern AGSEngine *g_vm;
diff --git a/engines/ags/music.cpp b/engines/ags/music.cpp
index 665a802a99..c46845d3eb 100644
--- a/engines/ags/music.cpp
+++ b/engines/ags/music.cpp
@@ -81,8 +81,6 @@ void Music::playMusic(Common::SeekableReadStream *midi, bool repeat) {
 
 		_parser = parser;
 
-		syncVolume();
-
 		_isLooping = repeat;
 		_isPlaying = true;
 	} else {




More information about the Scummvm-git-logs mailing list