[Scummvm-git-logs] scummvm master -> 85702e06764f95a6b700e348dd90931613efdc29
NMIError
noreply at scummvm.org
Sun Sep 21 16:26:52 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
85702e0676 AUDIO: Fix instrument bank initialization
Commit: 85702e06764f95a6b700e348dd90931613efdc29
https://github.com/scummvm/scummvm/commit/85702e06764f95a6b700e348dd90931613efdc29
Author: Coen Rampen (crampen at gmail.com)
Date: 2025-09-21T18:26:29+02:00
Commit Message:
AUDIO: Fix instrument bank initialization
Changed paths:
audio/adlib_ctmidi.cpp
audio/adlib_ctmidi.h
diff --git a/audio/adlib_ctmidi.cpp b/audio/adlib_ctmidi.cpp
index 2c7f3fe36d2..30e802795d0 100644
--- a/audio/adlib_ctmidi.cpp
+++ b/audio/adlib_ctmidi.cpp
@@ -368,6 +368,9 @@ const int8 MidiDriver_ADLIB_CTMIDI::NOTE_VOLUME_MODIFIER_VALUES[18] = {
MidiDriver_ADLIB_CTMIDI::MidiDriver_ADLIB_CTMIDI(OPL::Config::OplType oplType, int timerFrequency) :
MidiDriver_ADLIB_Multisource(oplType, timerFrequency) {
+ memset(_ctmidiInstrumentBank, 0, sizeof(_ctmidiInstrumentBank));
+ memset(_ctmidiRhythmBank, 0, sizeof(_ctmidiRhythmBank));
+
_instrumentWriteMode = INSTRUMENT_WRITE_MODE_FIRST_NOTE_ON;
_modulationDepth = MODULATION_DEPTH_LOW;
_vibratoDepth = VIBRATO_DEPTH_LOW;
diff --git a/audio/adlib_ctmidi.h b/audio/adlib_ctmidi.h
index e811718da39..339642f5f08 100644
--- a/audio/adlib_ctmidi.h
+++ b/audio/adlib_ctmidi.h
@@ -54,9 +54,9 @@ public:
protected:
// Instrument bank after conversion
- OplInstrumentDefinition _ctmidiInstrumentBank[128] = { 0 };
+ OplInstrumentDefinition _ctmidiInstrumentBank[128];
// Rhythm bank after conversion
- OplInstrumentDefinition _ctmidiRhythmBank[47] = { 0 };
+ OplInstrumentDefinition _ctmidiRhythmBank[47];
/**
* Sets the block / F-num registers for the rhythm instruments to default
More information about the Scummvm-git-logs
mailing list