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

bluegr noreply at scummvm.org
Sun Mar 31 20:05:01 UTC 2024


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

Summary:
0a5c94a0bc MIDI: load CM32L_*.ROM or MT32_*.ROM as pairs
0de5381038 MIDI: clear up debug message
e2fe9523e4 MIDI: close files on error


Commit: 0a5c94a0bcf50b7a3a1f5f5ac967f6b9fb8b45b0
    https://github.com/scummvm/scummvm/commit/0a5c94a0bcf50b7a3a1f5f5ac967f6b9fb8b45b0
Author: Stephen West (stephen.george.west at gmail.com)
Date: 2024-03-31T23:04:56+03:00

Commit Message:
MIDI: load CM32L_*.ROM or MT32_*.ROM as pairs

Changed paths:
    audio/softsynth/mt32.cpp


diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 1250ac0a24d..53ed1027997 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -168,12 +168,13 @@ int MidiDriver_MT32::open() {
 	debug(4, _s("Initializing MT-32 Emulator"));
 
 	Common::File controlFile;
-	if (!controlFile.open("CM32L_CONTROL.ROM") && !controlFile.open("MT32_CONTROL.ROM"))
-		error("Error opening MT32_CONTROL.ROM / CM32L_CONTROL.ROM. Check that your Extra Path in Paths settings is set to the correct directory");
-
 	Common::File pcmFile;
-	if (!pcmFile.open("CM32L_PCM.ROM") && !pcmFile.open("MT32_PCM.ROM"))
-		error("Error opening MT32_PCM.ROM / CM32L_PCM.ROM. Check that your Extra Path in Paths settings is set to the correct directory");
+	if (!controlFile.open("CM32L_CONTROL.ROM") || !pcmFile.open("CM32L_PCM.ROM")) {
+		debug("Error opening CM32L_CONTROL.ROM / CM32L_PCM.ROM. Falling back to MT32");
+
+		if (!controlFile.open("MT32_CONTROL.ROM") || !pcmFile.open("MT32_PCM.ROM"))
+			error("Error opening (CM32L_CONTROL.ROM / CM32L_PCM.ROM) or (MT32_CONTROL.ROM / MT32_PCM.ROM). Check that your Extra Path in Paths settings is set to the correct directory");
+	}
 
 	_controlData = new byte[controlFile.size()];
 	controlFile.read(_controlData, controlFile.size());


Commit: 0de53810380ec91f945708739303368581f87388
    https://github.com/scummvm/scummvm/commit/0de53810380ec91f945708739303368581f87388
Author: Stephen West (stephen.george.west at gmail.com)
Date: 2024-03-31T23:04:56+03:00

Commit Message:
MIDI: clear up debug message

Changed paths:
    audio/softsynth/mt32.cpp


diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 53ed1027997..3278d34a5b9 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -170,7 +170,7 @@ int MidiDriver_MT32::open() {
 	Common::File controlFile;
 	Common::File pcmFile;
 	if (!controlFile.open("CM32L_CONTROL.ROM") || !pcmFile.open("CM32L_PCM.ROM")) {
-		debug("Error opening CM32L_CONTROL.ROM / CM32L_PCM.ROM. Falling back to MT32");
+		debug("Unable to open CM32L_CONTROL.ROM / CM32L_PCM.ROM. Falling back to MT32");
 
 		if (!controlFile.open("MT32_CONTROL.ROM") || !pcmFile.open("MT32_PCM.ROM"))
 			error("Error opening (CM32L_CONTROL.ROM / CM32L_PCM.ROM) or (MT32_CONTROL.ROM / MT32_PCM.ROM). Check that your Extra Path in Paths settings is set to the correct directory");


Commit: e2fe9523e42aa78efc51f123626bbb51ea993e22
    https://github.com/scummvm/scummvm/commit/e2fe9523e42aa78efc51f123626bbb51ea993e22
Author: Stephen West (stephen.george.west at gmail.com)
Date: 2024-03-31T23:04:56+03:00

Commit Message:
MIDI: close files on error

Changed paths:
    audio/softsynth/mt32.cpp


diff --git a/audio/softsynth/mt32.cpp b/audio/softsynth/mt32.cpp
index 3278d34a5b9..093d9be5188 100644
--- a/audio/softsynth/mt32.cpp
+++ b/audio/softsynth/mt32.cpp
@@ -170,10 +170,15 @@ int MidiDriver_MT32::open() {
 	Common::File controlFile;
 	Common::File pcmFile;
 	if (!controlFile.open("CM32L_CONTROL.ROM") || !pcmFile.open("CM32L_PCM.ROM")) {
+		controlFile.close();
+		pcmFile.close();
 		debug("Unable to open CM32L_CONTROL.ROM / CM32L_PCM.ROM. Falling back to MT32");
 
-		if (!controlFile.open("MT32_CONTROL.ROM") || !pcmFile.open("MT32_PCM.ROM"))
+		if (!controlFile.open("MT32_CONTROL.ROM") || !pcmFile.open("MT32_PCM.ROM")) {
+			controlFile.close();
+			pcmFile.close();
 			error("Error opening (CM32L_CONTROL.ROM / CM32L_PCM.ROM) or (MT32_CONTROL.ROM / MT32_PCM.ROM). Check that your Extra Path in Paths settings is set to the correct directory");
+		}
 	}
 
 	_controlData = new byte[controlFile.size()];




More information about the Scummvm-git-logs mailing list