[Scummvm-git-logs] scummvm master -> 44e1e33f8fcd9b1ae31deb09cf5fddc4a0ddbcfc
antoniou79
noreply at scummvm.org
Mon Aug 4 14:57:54 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
8035138f96 TOON: Remove dependency on midi component
5ef6c6191a HDB: Remove dependency on midi component
44e1e33f8f SWORD25: Remove dependency on midi component
Commit: 8035138f9678a438b9037bf53d318f96768082f2
https://github.com/scummvm/scummvm/commit/8035138f9678a438b9037bf53d318f96768082f2
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-08-04T17:57:34+03:00
Commit Message:
TOON: Remove dependency on midi component
This modifies a behavior previously set as part of commit 2db6be103865225c5da2d5a8e4ad0457f5bc71fb
Under Global Options > Audio > Preferred device, and under Game Options > Audio > Music device, the user can select MIDI driver for music or set "No Music" from a dropdown menu.
These options are available through the game specific settings, even if the game sets GUIO_NOMIDI in its detection entries.
So we choose to respect a user's setting of "No Music" there, by turning off the music.
Only this setting is respected. All other options in that dropdown are treated as irrelevant, and if selected, the music will play in-game.
This change follows a similar change in bladerunner engine that used similar (almost identical) code for this issue.
When building just for toon engine (--disable-all-engines --enable-engine=toon) the game would not get music
if the setting under global options or specific game options (if overriding Audio settings) is not a valid midi device (or auto).
Changed paths:
engines/toon/toon.cpp
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index 874a086857d..93dc19c5198 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -35,7 +35,6 @@
#include "common/memstream.h"
#include "common/translation.h"
-#include "audio/mididrv.h"
#include "engines/advancedDetector.h"
#include "engines/util.h"
#include "graphics/paletteman.h"
@@ -171,9 +170,17 @@ void ToonEngine::init() {
_audioManager->loadAudioPack(2, "GENERIC.SEI", "GENERIC.SEL");
- // Query the selected music device (defaults to MT_AUTO device).
- MidiDriver::DeviceHandle dev = MidiDriver::getDeviceHandle(ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto"));
- _noMusicDriver = (MidiDriver::getMusicType(dev) == MT_NULL || MidiDriver::getMusicType(dev) == MT_INVALID);
+ // Get the selected "music device" (defaults to MT_AUTO device)
+ // as set from Audio > Music Device dropdown setting, which commonly is for MIDI driver selection.
+ // Since this engine does not use MIDI, but the setting is still available from the "Global Options... > Audio"
+ // and the specific game options (Game Options... > Audio), we respect only the option "No Music" to avoid end user confusion.
+ // All other options for this dropdown will result in music playing and are treated as irrelevant.
+ Common::String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
+ _noMusicDriver = (selDevStr.compareToIgnoreCase(Common::String("null")) == 0);
+
+ if (_noMusicDriver) {
+ warning("AUDIO: MUSIC IS FORCED TO OFF (BY THE MIDI DRIVER SETTING - music_driver was set to \"null\")");
+ }
syncSoundSettings();
Commit: 5ef6c6191a672fecd57b298559a196b39f9b8bf0
https://github.com/scummvm/scummvm/commit/5ef6c6191a672fecd57b298559a196b39f9b8bf0
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-08-04T17:57:34+03:00
Commit Message:
HDB: Remove dependency on midi component
This modifies a behavior previously set as part of commit 1ab83c2a289b5cfb6ac33678bdfd96f8739c17f6
Under Global Options > Audio > Preferred device, and under Game Options > Audio > Music device, the user can select MIDI driver for music or set "No Music" from a dropdown menu.
These options are available through the game specific settings, even if the game sets GUIO_NOMIDI in its detection entries.
So we choose to respect a user's setting of "No Music" there, by turning off the music.
Only this setting is respected. All other options in that dropdown are treated as irrelevant, and if selected, the music will play in-game.
This change follows a similar change in bladerunner engine that used similar (almost identical) code for this issue.
When building just for hdb engine (--disable-all-engines --enable-engine=hdb) the game would not get music
if the setting under global options or specific game options (if overriding Audio settings) is not a valid midi device (or auto) even if not explicitly set to "No Music".
Changed paths:
engines/hdb/hdb.cpp
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index 2a381182832..c434e756fd4 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -36,8 +36,6 @@
#include "hdb/mpc.h"
#include "hdb/window.h"
-#include "audio/mididrv.h"
-
#define CHEAT_PATCHES 0
namespace HDB {
@@ -179,9 +177,18 @@ bool HDBGame::init() {
_lua->init();
_menu->init();
- // Query the selected music device (defaults to MT_AUTO device).
- MidiDriver::DeviceHandle dev = MidiDriver::getDeviceHandle(ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto"));
- _noMusicDriver = (MidiDriver::getMusicType(dev) == MT_NULL || MidiDriver::getMusicType(dev) == MT_INVALID);
+ // Get the selected "music device" (defaults to MT_AUTO device)
+ // as set from Audio > Music Device dropdown setting, which commonly is for MIDI driver selection.
+ // Since this engine does not use MIDI, but the setting is still available from the "Global Options... > Audio"
+ // and the specific game options (Game Options... > Audio), we respect only the option "No Music" to avoid end user confusion.
+ // All other options for this dropdown will result in music playing and are treated as irrelevant.
+ Common::String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
+ _noMusicDriver = (selDevStr.compareToIgnoreCase(Common::String("null")) == 0);
+
+ if (_noMusicDriver) {
+ warning("AUDIO: MUSIC IS FORCED TO OFF (BY THE MIDI DRIVER SETTING - music_driver was set to \"null\")");
+ }
+
syncSoundSettings();
_debugLogo = _gfx->loadIcon("icon_debug_logo");
Commit: 44e1e33f8fcd9b1ae31deb09cf5fddc4a0ddbcfc
https://github.com/scummvm/scummvm/commit/44e1e33f8fcd9b1ae31deb09cf5fddc4a0ddbcfc
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-08-04T17:57:35+03:00
Commit Message:
SWORD25: Remove dependency on midi component
This modifies a behavior previously set by commit 7e04f3d9399bf7e7f0b3ef2b5d9150afefe4d65b
Under Global Options > Audio > Preferred device, and under Game Options > Audio > Music device, the user can select MIDI driver for music or set "No Music" from a dropdown menu.
These options are available through the game specific settings, even if the game sets GUIO_NOMIDI in its detection entries.
So we choose to respect a user's setting of "No Music" there, by turning off the music.
Only this setting is respected. All other options in that dropdown are treated as irrelevant, and if selected, the music will play in-game.
This change follows a similar change in bladerunner engine that used similar (almost identical) code for this issue.
When building just for sword25 engine (--disable-all-engines --enable-engine=sword25) the game would not get music
if the setting under global options or specific game options (if overriding Audio settings) is not a valid midi device (or auto) even if not explicitly set to "No Music".
Changed paths:
engines/sword25/sfx/soundengine.cpp
diff --git a/engines/sword25/sfx/soundengine.cpp b/engines/sword25/sfx/soundengine.cpp
index 42eb3c850d4..6817cf49a2b 100644
--- a/engines/sword25/sfx/soundengine.cpp
+++ b/engines/sword25/sfx/soundengine.cpp
@@ -37,7 +37,6 @@
#include "audio/audiostream.h"
#include "audio/decoders/vorbis.h"
-#include "audio/mididrv.h"
#include "common/system.h"
#include "common/config-manager.h"
@@ -66,12 +65,16 @@ SoundEngine::SoundEngine(Kernel *pKernel) : ResourceService(pKernel) {
_maxHandleId = 1;
+ // Get the selected "music device" (defaults to MT_AUTO device)
+ // as set from Audio > Music Device dropdown setting, which commonly is for MIDI driver selection.
+ // Since this engine does not use MIDI, but the setting is still available from the "Global Options... > Audio"
+ // and the specific game options (Game Options... > Audio), we respect only the option "No Music" to avoid end user confusion.
+ // All other options for this dropdown will result in music playing and are treated as irrelevant.
Common::String selDevStr = ConfMan.hasKey("music_driver") ? ConfMan.get("music_driver") : Common::String("auto");
- MidiDriver::DeviceHandle dev = MidiDriver::getDeviceHandle(selDevStr.empty() ? Common::String("auto") : selDevStr);
- _noMusic = (MidiDriver::getMusicType(dev) == MT_NULL || MidiDriver::getMusicType(dev) == MT_INVALID);
+ _noMusic = (selDevStr.compareToIgnoreCase(Common::String("null")) == 0);
if (_noMusic) {
- warning("AUDIO: MUSIC IS FORCED TO OFF");
+ warning("AUDIO: MUSIC IS FORCED TO OFF (BY THE MIDI DRIVER SETTING - music_driver was set to \"null\")");
ConfMan.setInt("music_volume", 0);
}
}
More information about the Scummvm-git-logs
mailing list