aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-09-26 03:15:28 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-09-26 03:15:28 +0300
commit98caeed048a59ae639fe02858e98f35984585aca (patch)
tree61b37158b3d7bdb6db0b0fd48b3fa80a3d3564ee
parent63dfa67e16887c550b29ee5a1e97c895a9878441 (diff)
downloadlibADLMIDI-98caeed048a59ae639fe02858e98f35984585aca.tar.gz
libADLMIDI-98caeed048a59ae639fe02858e98f35984585aca.tar.bz2
libADLMIDI-98caeed048a59ae639fe02858e98f35984585aca.zip
Add the competition between channels with releasing notes
#181
-rw-r--r--src/adlmidi_midiplay.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index 105d54a..276a33d 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -1343,10 +1343,10 @@ int64_t MIDIplay::calculateChipChannelGoodness(size_t c, const MIDIchannel::Note
// Rate channel with a releasing note
if(s < 0 && chan.users_empty())
{
- s = -10000;
+ s -= 40000;
// If it's same instrument, better chance to get it when no free channels
if(chan.recent_ins == ins)
- s = (m_synth.m_musicMode == OPL3::MODE_CMF) ? 0 : -5000;
+ s = (m_synth.m_musicMode == OPL3::MODE_CMF) ? 0 : -koff_ms;
return s;
}