aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/adlmidi_midiplay.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index 843bdb2..09a4c15 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -1364,13 +1364,12 @@ int64_t MIDIplay::calculateChipChannelGoodness(size_t c, const MIDIchannel::Note
{
s -= 40000;
// If it's same instrument, better chance to get it when no free channels
- if(chan.recent_ins == ins)
- {
- if(synth.m_musicMode == Synth::MODE_CMF || synth.m_volumeScale == Synth::VOLUME_HMI)
- s = 0; // Re-use channel immediately
- else
- s = -koff_ms; // Wait until releasing sound will complete
- }
+ if(chan.recent_ins == ins && synth.m_musicMode == Synth::MODE_CMF)
+ s = 0; // Re-use releasing channel with the same instrument
+ else if(synth.m_volumeScale == Synth::VOLUME_HMI)
+ s = 0; // HMI doesn't care about the same instrument
+ else
+ s = -koff_ms; // Wait until releasing sound will complete
return s;
}