[Scummvm-git-logs] scummvm branch-2-3 -> a7f7d774b59be6ff272eee35490599fbe50055d3
NMIError
60350957+NMIError at users.noreply.github.com
Fri Sep 10 13:03:45 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:
8926c8ea54 AGS: Fix MIDI volume control
a7f7d774b5 AGS: Fix hanging sustained notes
Commit: 8926c8ea542ba70271b4fc96ab5bf0ef861225e3
https://github.com/scummvm/scummvm/commit/8926c8ea542ba70271b4fc96ab5bf0ef861225e3
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-09-10T15:03:35+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 9d43e78e17..72493a456c 100644
--- a/engines/ags/music.cpp
+++ b/engines/ags/music.cpp
@@ -80,8 +80,6 @@ void Music::playMusic(Common::SeekableReadStream *midi, bool repeat) {
_parser = parser;
- syncVolume();
-
_isLooping = repeat;
_isPlaying = true;
} else {
Commit: a7f7d774b59be6ff272eee35490599fbe50055d3
https://github.com/scummvm/scummvm/commit/a7f7d774b59be6ff272eee35490599fbe50055d3
Author: Coen Rampen (crampen at gmail.com)
Date: 2021-09-10T15:03:35+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 72493a456c..c46845d3eb 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;
More information about the Scummvm-git-logs
mailing list