[Scummvm-git-logs] scummvm master -> 57cb3443962cd7ce69b5b933dcf654ef827bd665
athrxx
athrxx at scummvm.org
Sun Jun 21 14:07:23 UTC 2020
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:
57cb344396 MIDI: Fix _gsBank init and bad if statement (#2341)
Commit: 57cb3443962cd7ce69b5b933dcf654ef827bd665
https://github.com/scummvm/scummvm/commit/57cb3443962cd7ce69b5b933dcf654ef827bd665
Author: NMIError (60350957+NMIError at users.noreply.github.com)
Date: 2020-06-21T16:07:20+02:00
Commit Message:
MIDI: Fix _gsBank init and bad if statement (#2341)
Changed paths:
audio/mididrv.cpp
audio/mididrv.h
diff --git a/audio/mididrv.cpp b/audio/mididrv.cpp
index f47c8d2fd9..97799161be 100644
--- a/audio/mididrv.cpp
+++ b/audio/mididrv.cpp
@@ -696,8 +696,7 @@ byte MidiDriver::correctInstrumentBank(byte outputChannel, byte patchId) {
default:
// The other instruments only have a capital tone. Bank selects
// 1-63 are corrected to the capital tone.
- if (_gsBank[outputChannel] >= 0)
- correctedBank = 0;
+ correctedBank = 0;
break;
}
diff --git a/audio/mididrv.h b/audio/mididrv.h
index d974757436..6c8a2f2d5d 100644
--- a/audio/mididrv.h
+++ b/audio/mididrv.h
@@ -260,7 +260,9 @@ private:
public:
MidiDriver() : _reversePanning(false),
- _scaleGSPercussionVolumeToMT32(false) { }
+ _scaleGSPercussionVolumeToMT32(false) {
+ memset(_gsBank, 0, sizeof(_gsBank));
+ }
virtual ~MidiDriver() { }
static const byte _mt32ToGm[128];
More information about the Scummvm-git-logs
mailing list