diff options
author | Wohlstand <admin@wohlnet.ru> | 2018-10-01 12:38:32 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2018-10-01 12:38:32 +0300 |
commit | 75daca694c01156dc447993060b1b285f3db3056 (patch) | |
tree | 0e70115d0e506d64b1e5d6abab054019c7e78bbb /src/adlmidi_private.cpp | |
parent | d9e1a993d5b8cbeae4f2db5bce81147c3dc42fa7 (diff) | |
parent | 314cde9fccb603bbd2b36b58dc9b3020c160ac4b (diff) | |
download | libADLMIDI-75daca694c01156dc447993060b1b285f3db3056.tar.gz libADLMIDI-75daca694c01156dc447993060b1b285f3db3056.tar.bz2 libADLMIDI-75daca694c01156dc447993060b1b285f3db3056.zip |
Merge branch 'master' of github.com:Wohlstand/libADLMIDI 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; } |