diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-24 21:46:38 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-24 21:46:38 +0300 |
commit | 60f7ea56a4ccc88a8e747b87ba9fb39f1d8330b5 (patch) | |
tree | cc26e12e08a485a8b928991936482fc0c77796f3 /src/adlmidi_private.cpp | |
parent | 76eb1a12ef6e6a3f8c7f6c0a226fc5b35dd99536 (diff) | |
download | libADLMIDI-60f7ea56a4ccc88a8e747b87ba9fb39f1d8330b5.tar.gz libADLMIDI-60f7ea56a4ccc88a8e747b87ba9fb39f1d8330b5.tar.bz2 libADLMIDI-60f7ea56a4ccc88a8e747b87ba9fb39f1d8330b5.zip |
[Experimental] Big re-factoring of internals and clean-up
- Renamed functions
- Renamed variables
- Documenting of most library internal stuff
- Disabling of embedded banks no more conflicts with accidental linking of adldata.cpp
Diffstat (limited to 'src/adlmidi_private.cpp')
-rw-r--r-- | src/adlmidi_private.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/adlmidi_private.cpp b/src/adlmidi_private.cpp index 3bc73a4..8d7b9a7 100644 --- a/src/adlmidi_private.cpp +++ b/src/adlmidi_private.cpp @@ -40,11 +40,13 @@ int adlRefreshNumCards(ADL_MIDIPlayer *device) MIDIplay *play = reinterpret_cast<MIDIplay *>(device->adl_midiPlayer); //Automatically calculate how much 4-operator channels is necessary - if(play->opl.AdlBank == ~0u) +#ifndef DISABLE_EMBEDDED_BANKS + if(play->m_synth.m_embeddedBank == ~0u) +#endif { //For custom bank - OPL3::BankMap::iterator it = play->opl.dynamic_banks.begin(); - OPL3::BankMap::iterator end = play->opl.dynamic_banks.end(); + OPL3::BankMap::iterator it = play->m_synth.m_insBanks.begin(); + OPL3::BankMap::iterator end = play->m_synth.m_insBanks.end(); for(; it != end; ++it) { uint16_t bank = it->first; @@ -60,12 +62,13 @@ int adlRefreshNumCards(ADL_MIDIPlayer *device) } } } +#ifndef DISABLE_EMBEDDED_BANKS else { //For embedded bank for(unsigned a = 0; a < 256; ++a) { - unsigned insno = banks[play->m_setup.AdlBank][a]; + unsigned insno = banks[play->m_setup.bankId][a]; if(insno == 198) continue; ++n_total[a / 128]; @@ -74,6 +77,7 @@ int adlRefreshNumCards(ADL_MIDIPlayer *device) ++n_fourop[a / 128]; } } +#endif unsigned numFourOps = 0; @@ -96,7 +100,7 @@ int adlRefreshNumCards(ADL_MIDIPlayer *device) : (play->m_setup.NumCards == 1 ? 1 : play->m_setup.NumCards * 4); */ - play->opl.NumFourOps = play->m_setup.NumFourOps = (numFourOps * play->m_setup.NumCards); + play->m_synth.m_numFourOps = play->m_setup.numFourOps = (numFourOps * play->m_setup.numChips); return 0; } |