diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-01 01:18:21 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-01 01:18:21 +0300 |
commit | 4b0ffdce25540765276ef2e6f6f8cc72a733f7cf (patch) | |
tree | d4a6fbadeae6999cfb9e414dafdca1a61365585c /src/adlmidi_private.cpp | |
parent | 35c385b63619c74a08063ac29edb7f1f063f14d1 (diff) | |
download | libADLMIDI-4b0ffdce25540765276ef2e6f6f8cc72a733f7cf.tar.gz libADLMIDI-4b0ffdce25540765276ef2e6f6f8cc72a733f7cf.tar.bz2 libADLMIDI-4b0ffdce25540765276ef2e6f6f8cc72a733f7cf.zip |
Small polish of the 4op channels count auto-choose formula
Diffstat (limited to 'src/adlmidi_private.cpp')
-rw-r--r-- | src/adlmidi_private.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/adlmidi_private.cpp b/src/adlmidi_private.cpp index 83a40aa..3d9d9e9 100644 --- a/src/adlmidi_private.cpp +++ b/src/adlmidi_private.cpp @@ -61,19 +61,20 @@ int adlRefreshNumCards(ADL_MIDIPlayer *device) } } - unsigned NumFourOps = 0; + unsigned numFourOps = 0; + // All 2ops (no 4ops) if((n_fourop[0] == 0) && (n_fourop[1] == 0)) - NumFourOps = 0; + numFourOps = 0; // All 2op melodics and Some (or All) 4op drums else if((n_fourop[0] == 0) && (n_fourop[1] > 0)) - NumFourOps = (play->m_setup.NumCards == 1) ? 2 : play->m_setup.NumCards * 4; + numFourOps = 2; // Many 4op melodics else if((n_fourop[0] >= (n_total[0] * 7) / 8)) - NumFourOps = play->m_setup.NumCards * 6; + numFourOps = 6; // Few 4op melodics else if(n_fourop[0] > 0) - NumFourOps = play->m_setup.NumCards * 4; + numFourOps = 4; /* //Old formula unsigned NumFourOps = ((n_fourop[0] == 0) && (n_fourop[1] == 0)) ? 0 @@ -81,7 +82,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->opl.NumFourOps = play->m_setup.NumFourOps = (numFourOps * play->m_setup.NumCards); return 0; } |