aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_private.cpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2017-10-25 03:01:50 +0300
committerWohlstand <admin@wohlnet.ru>2017-10-25 03:01:50 +0300
commit0401ee9f58ea842cb4aef687e8e107380d46445c (patch)
tree900ba7dad4b6bb70bad88c401cff1494884de2bb /src/adlmidi_private.cpp
parent6783770a8533dd099b39c51a5c3f7f5f4000b4bc (diff)
downloadlibADLMIDI-0401ee9f58ea842cb4aef687e8e107380d46445c.tar.gz
libADLMIDI-0401ee9f58ea842cb4aef687e8e107380d46445c.tar.bz2
libADLMIDI-0401ee9f58ea842cb4aef687e8e107380d46445c.zip
Clean-up
- Move all private variables into MIDIplay class away from public ADL_MIDIPlayer structure - Comment out most of legacy code - Implement new-style ReadVarLenEx for error-checked var-len value reading process TODO: Stabilize this and implement missing fields and API calls (meta-data retreiving)
Diffstat (limited to 'src/adlmidi_private.cpp')
-rw-r--r--src/adlmidi_private.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/adlmidi_private.cpp b/src/adlmidi_private.cpp
index c888b18..04bb481 100644
--- a/src/adlmidi_private.cpp
+++ b/src/adlmidi_private.cpp
@@ -47,7 +47,7 @@ int adlRefreshNumCards(ADL_MIDIPlayer *device)
//For embedded bank
for(unsigned a = 0; a < 256; ++a)
{
- unsigned insno = banks[device->AdlBank][a];
+ unsigned insno = banks[play->m_setup.AdlBank][a];
if(insno == 198)
continue;
++n_total[a / 128];
@@ -57,13 +57,13 @@ int adlRefreshNumCards(ADL_MIDIPlayer *device)
}
}
- device->NumFourOps =
- (n_fourop[0] >= n_total[0] * 7 / 8) ? device->NumCards * 6
- : (n_fourop[0] < n_total[0] * 1 / 8) ? 0
- : (device->NumCards == 1 ? 1 : device->NumCards * 4);
- play->opl.NumFourOps = device->NumFourOps;
+ play->m_setup.NumFourOps =
+ (n_fourop[0] >= n_total[0] * 7 / 8) ? play->m_setup.NumCards * 6
+ : (n_fourop[0] < n_total[0] * 1 / 8) ? 0
+ : (play->m_setup.NumCards == 1 ? 1 : play->m_setup.NumCards * 4);
+ play->opl.NumFourOps = play->m_setup.NumFourOps;
- if(n_fourop[0] >= n_total[0] * 15 / 16 && device->NumFourOps == 0)
+ if(n_fourop[0] >= n_total[0] * 15 / 16 && play->m_setup.NumFourOps == 0)
{
ADLMIDI_ErrorString = "ERROR: You have selected a bank that consists almost exclusively of four-op patches.\n"
" The results (silence + much cpu load) would be probably\n"