diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-09-30 04:57:56 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-09-30 04:57:56 +0300 |
commit | c971992278519b29768be349dd3962bbd93dbb22 (patch) | |
tree | ee1ece6c4c28a7784c02cc2d9a8aaecc4808fd29 /src/adlmidi_private.cpp | |
parent | 4cf3a53ed36e56985753a9d0ec5ba564d6043460 (diff) | |
download | libADLMIDI-c971992278519b29768be349dd3962bbd93dbb22.tar.gz libADLMIDI-c971992278519b29768be349dd3962bbd93dbb22.tar.bz2 libADLMIDI-c971992278519b29768be349dd3962bbd93dbb22.zip |
Lock settings for CMF and IMF playing to don't destroy them
For now, all settings are in safe, except of custom bank that getting be dropped away by CMF file that does passing of own custom instruments.
Diffstat (limited to 'src/adlmidi_private.cpp')
-rw-r--r-- | src/adlmidi_private.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/adlmidi_private.cpp b/src/adlmidi_private.cpp index 43fe8de..4e8e488 100644 --- a/src/adlmidi_private.cpp +++ b/src/adlmidi_private.cpp @@ -34,10 +34,9 @@ void adl_audioTickHandler(void *instance, uint32_t chipId, uint32_t rate) } #endif -int adlRefreshNumCards(ADL_MIDIPlayer *device) +int adlCalculateFourOpChannels(MIDIplay *play, bool silent) { size_t n_fourop[2] = {0, 0}, n_total[2] = {0, 0}; - MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer); //Automatically calculate how much 4-operator channels is necessary #ifndef DISABLE_EMBEDDED_BANKS @@ -100,9 +99,10 @@ int adlRefreshNumCards(ADL_MIDIPlayer *device) : (play->m_setup.NumCards == 1 ? 1 : play->m_setup.NumCards * 4); */ - play->m_synth.m_numFourOps = play->m_setup.numFourOps = static_cast<unsigned>(numFourOps * play->m_setup.numChips); + play->m_synth.m_numFourOps = static_cast<unsigned>(numFourOps * play->m_synth.m_numChips); // Update channel categories and set up four-operator channels - play->m_synth.updateChannelCategories(); + if(!silent) + play->m_synth.updateChannelCategories(); return 0; } |