diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-04-10 02:15:03 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-04-10 02:15:03 +0300 |
commit | 8a0a939a3281a31fc17327d24f0a4c0975a1b9fa (patch) | |
tree | e5f87aba998ede08465aa319af7dba930abff025 /src/adlmidi_midiplay.cpp | |
parent | 0ad695eeaaf5d52d3ea4ef15d295d8cc62002a50 (diff) | |
download | libADLMIDI-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/adlmidi_midiplay.cpp')
-rw-r--r-- | src/adlmidi_midiplay.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 13e1008..7b15349 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -710,6 +710,8 @@ MIDIplay::MIDIplay(unsigned long sampleRate): { devices.clear(); + m_setup.emulator = ADLMIDI_EMU_NUKED; + m_setup.PCM_RATE = sampleRate; m_setup.mindelay = 1.0 / (double)m_setup.PCM_RATE; m_setup.maxdelay = 512.0 / (double)m_setup.PCM_RATE; @@ -752,7 +754,7 @@ void MIDIplay::applySetup() opl.NumFourOps = m_setup.NumFourOps; cmf_percussion_mode = false; - opl.Reset(m_setup.PCM_RATE); + opl.Reset(m_setup.emulator, m_setup.PCM_RATE); ch.clear(); ch.resize(opl.NumChannels); } |