diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2018-10-05 20:13:39 +0200 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2018-10-05 20:13:39 +0200 |
commit | 046214a0130922baa322d195ae39c813693c446b (patch) | |
tree | f872addde05f6af4dac5911b97bfe9734505631b /src/adlmidi_private.cpp | |
parent | 8c33b86d581183c16e5ca32f8775e7994cf25729 (diff) | |
download | libADLMIDI-046214a0130922baa322d195ae39c813693c446b.tar.gz libADLMIDI-046214a0130922baa322d195ae39c813693c446b.tar.bz2 libADLMIDI-046214a0130922baa322d195ae39c813693c446b.zip |
reorganize MIDIplay code
Diffstat (limited to 'src/adlmidi_private.cpp')
-rw-r--r-- | src/adlmidi_private.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/adlmidi_private.cpp b/src/adlmidi_private.cpp index 4e8e488..00507ff 100644 --- a/src/adlmidi_private.cpp +++ b/src/adlmidi_private.cpp @@ -21,6 +21,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "adlmidi_midiplay.hpp" #include "adlmidi_private.hpp" std::string ADLMIDI_ErrorString; @@ -36,16 +37,17 @@ void adl_audioTickHandler(void *instance, uint32_t chipId, uint32_t rate) int adlCalculateFourOpChannels(MIDIplay *play, bool silent) { + OPL3 &synth = *play->m_synth; size_t n_fourop[2] = {0, 0}, n_total[2] = {0, 0}; //Automatically calculate how much 4-operator channels is necessary #ifndef DISABLE_EMBEDDED_BANKS - if(play->m_synth.m_embeddedBank == OPL3::CustomBankTag) + if(synth.m_embeddedBank == OPL3::CustomBankTag) #endif { //For custom bank - OPL3::BankMap::iterator it = play->m_synth.m_insBanks.begin(); - OPL3::BankMap::iterator end = play->m_synth.m_insBanks.end(); + OPL3::BankMap::iterator it = synth.m_insBanks.begin(); + OPL3::BankMap::iterator end = synth.m_insBanks.end(); for(; it != end; ++it) { size_t bank = it->first; @@ -99,10 +101,10 @@ int adlCalculateFourOpChannels(MIDIplay *play, bool silent) : (play->m_setup.NumCards == 1 ? 1 : play->m_setup.NumCards * 4); */ - play->m_synth.m_numFourOps = static_cast<unsigned>(numFourOps * play->m_synth.m_numChips); + synth.m_numFourOps = static_cast<unsigned>(numFourOps * synth.m_numChips); // Update channel categories and set up four-operator channels if(!silent) - play->m_synth.updateChannelCategories(); + synth.updateChannelCategories(); return 0; } |