diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-09-30 20:43:22 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-09-30 20:43:22 +0300 |
commit | 299f4614cf77862c3f20b6b95c56c91102d1e27a (patch) | |
tree | 82e77298d966a3295c88479ac3ae1abc5a1f84f8 /src/adlmidi_private.cpp | |
parent | 204c483dee24a3053ba220e0cafb6e065a215813 (diff) | |
parent | 77e8b86be524edf42a7070e2b7a1f6f67d7cfaa8 (diff) | |
download | libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.tar.gz libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.tar.bz2 libADLMIDI-299f4614cf77862c3f20b6b95c56c91102d1e27a.zip |
Merge branch 'master' into stable
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; } |