diff options
author | Wohlstand <admin@wohlnet.ru> | 2020-08-24 23:21:53 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2020-08-24 23:21:53 +0300 |
commit | 98e239c7aa86a73e1fa29e331c2258990be0470e (patch) | |
tree | d5aaeee2ec0bcb7e95d55d65a30895b50cf10824 | |
parent | ccbafdefa7b0ab02e7a3e28b4d9d3cd311abd367 (diff) | |
download | libADLMIDI-98e239c7aa86a73e1fa29e331c2258990be0470e.tar.gz libADLMIDI-98e239c7aa86a73e1fa29e331c2258990be0470e.tar.bz2 libADLMIDI-98e239c7aa86a73e1fa29e331c2258990be0470e.zip |
ADLMIDI2: Fixed an "bank always 0" bug
-rw-r--r-- | include/adlmidi.hpp | 2 | ||||
-rw-r--r-- | src/adlmidi_midiplay.cpp | 7 | ||||
-rw-r--r-- | utils/adlmidi-2/midiplay.cc | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/include/adlmidi.hpp b/include/adlmidi.hpp index 69ee026..0df6dd4 100644 --- a/include/adlmidi.hpp +++ b/include/adlmidi.hpp @@ -37,6 +37,8 @@ public: explicit AdlInstrumentTester(ADL_MIDIPlayer *device); virtual ~AdlInstrumentTester(); + void start(); + // Find list of adlib instruments that supposedly implement this GM void FindAdlList(); void DoNote(int note); diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 2ed7815..c3ef14c 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1888,8 +1888,6 @@ ADLMIDI_EXPORT AdlInstrumentTester::AdlInstrumentTester(ADL_MIDIPlayer *device) p->cur_note = -1; p->play = play; p->opl = play ? play->m_synth.get() : NULL; - - NextGM(0); #else ADL_UNUSED(device); #endif @@ -1900,6 +1898,11 @@ ADLMIDI_EXPORT AdlInstrumentTester::~AdlInstrumentTester() delete p; } +ADLMIDI_EXPORT void AdlInstrumentTester::start() +{ + NextGM(0); +} + ADLMIDI_EXPORT void AdlInstrumentTester::FindAdlList() { #ifndef DISABLE_EMBEDDED_BANKS diff --git a/utils/adlmidi-2/midiplay.cc b/utils/adlmidi-2/midiplay.cc index 773e766..c77d180 100644 --- a/utils/adlmidi-2/midiplay.cc +++ b/utils/adlmidi-2/midiplay.cc @@ -1902,6 +1902,9 @@ int main(int argc, char **argv) AdlInstrumentTester InstrumentTester(myDevice); + if(DoingInstrumentTesting) + InstrumentTester.start(); + //static std::vector<int> sample_buf; #ifdef __DJGPP__ double tick_delay = 0.0; |