aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_opl3.cpp
diff options
context:
space:
mode:
authorVitaly Novichkov <Wohlstand@users.noreply.github.com>2019-02-23 21:07:40 +0300
committerGitHub <noreply@github.com>2019-02-23 21:07:40 +0300
commitb51a2a538b7b539ba814df343d4c346ab6c98dbf (patch)
tree7f0db4a00ae254318ac6c7579974a17c13557fd6 /src/adlmidi_opl3.cpp
parent9e01b5b7c1591ac0424dd708ca009a5d4fee1de4 (diff)
parent80aa7e0bcb4d65dd8ed12b1d6c1ff5ad18007a6e (diff)
downloadlibADLMIDI-b51a2a538b7b539ba814df343d4c346ab6c98dbf.tar.gz
libADLMIDI-b51a2a538b7b539ba814df343d4c346ab6c98dbf.tar.bz2
libADLMIDI-b51a2a538b7b539ba814df343d4c346ab6c98dbf.zip
Merge pull request #205 from jpcima/opal
support the Opal emulator
Diffstat (limited to 'src/adlmidi_opl3.cpp')
-rw-r--r--src/adlmidi_opl3.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp
index 8d97442..7101319 100644
--- a/src/adlmidi_opl3.cpp
+++ b/src/adlmidi_opl3.cpp
@@ -43,6 +43,11 @@ static const unsigned OPLBase = 0x388;
# ifndef ADLMIDI_DISABLE_DOSBOX_EMULATOR
# include "chips/dosbox_opl3.h"
# endif
+
+// Opal emulator
+# ifndef ADLMIDI_DISABLE_OPAL_EMULATOR
+# include "chips/opal_opl3.h"
+# endif
#endif
static const unsigned adl_emulatorSupport = 0
@@ -54,6 +59,10 @@ static const unsigned adl_emulatorSupport = 0
# ifndef ADLMIDI_DISABLE_DOSBOX_EMULATOR
| (1u << ADLMIDI_EMU_DOSBOX)
# endif
+
+# ifndef ADLMIDI_DISABLE_OPAL_EMULATOR
+ | (1u << ADLMIDI_EMU_OPAL)
+# endif
#endif
;
@@ -767,6 +776,11 @@ void OPL3::reset(int emulator, unsigned long PCM_RATE, void *audioTickHandler)
chip = new DosBoxOPL3;
break;
#endif
+#ifndef ADLMIDI_DISABLE_OPAL_EMULATOR
+ case ADLMIDI_EMU_OPAL:
+ chip = new OpalOPL3;
+ break;
+#endif
}
m_chips[i].reset(chip);
chip->setChipId((uint32_t)i);