aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/adlmidi.hpp2
-rw-r--r--src/adlmidi_midiplay.cpp7
-rw-r--r--utils/adlmidi-2/midiplay.cc3
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;