aboutsummaryrefslogtreecommitdiff
path: root/src/chips/opl_chip_base.cpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-04-10 02:15:03 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-04-10 02:15:03 +0300
commit8a0a939a3281a31fc17327d24f0a4c0975a1b9fa (patch)
treee5f87aba998ede08465aa319af7dba930abff025 /src/chips/opl_chip_base.cpp
parent0ad695eeaaf5d52d3ea4ef15d295d8cc62002a50 (diff)
downloadlibADLMIDI-8a0a939a3281a31fc17327d24f0a4c0975a1b9fa.tar.gz
libADLMIDI-8a0a939a3281a31fc17327d24f0a4c0975a1b9fa.tar.bz2
libADLMIDI-8a0a939a3281a31fc17327d24f0a4c0975a1b9fa.zip
[Experimental] Added support for emulation core switching in real time!
Due to clunky playback on updated Nuked OPL3 emulator v 1.8, I kept the Nuked OPL3 1.7.4 work in parallel and be a separated switchable emulator.
Diffstat (limited to 'src/chips/opl_chip_base.cpp')
-rw-r--r--src/chips/opl_chip_base.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/chips/opl_chip_base.cpp b/src/chips/opl_chip_base.cpp
new file mode 100644
index 0000000..65d4b73
--- /dev/null
+++ b/src/chips/opl_chip_base.cpp
@@ -0,0 +1,22 @@
+#include "opl_chip_base.h"
+
+OPLChipBase::OPLChipBase() :
+ m_rate(44100)
+{}
+
+OPLChipBase::OPLChipBase(const OPLChipBase &c):
+ m_rate(c.m_rate)
+{}
+
+OPLChipBase::~OPLChipBase()
+{}
+
+void OPLChipBase::setRate(uint32_t rate)
+{
+ m_rate = rate;
+}
+
+void OPLChipBase::reset(uint32_t rate)
+{
+ setRate(rate);
+}