From f3dd9a6e69ba4ddc1359287754029f588db249df Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sun, 6 Sep 2020 00:56:41 +0300 Subject: Added an aproximated HMI volume model --- src/adlmidi_midiplay.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/adlmidi_midiplay.cpp') diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index a7fb4ed..843bdb2 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1365,7 +1365,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) - s = (synth.m_musicMode == Synth::MODE_CMF) ? 0 : -koff_ms; + { + 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 + } return s; } -- cgit v1.2.3