aboutsummaryrefslogtreecommitdiff
path: root/src/adlmidi_midiplay.cpp
diff options
context:
space:
mode:
authorWohlstand <admin@wohlnet.ru>2023-06-16 03:21:36 +0300
committerWohlstand <admin@wohlnet.ru>2023-06-16 03:21:36 +0300
commit283c7ba09add0c0a361c22ff38897fe8c0d50332 (patch)
tree0a700fd010175aae719672c29c75862e096d3589 /src/adlmidi_midiplay.cpp
parentfc4c05d99cb386f0f4fe7528305dd7b9b0a7d52d (diff)
downloadlibADLMIDI-283c7ba09add0c0a361c22ff38897fe8c0d50332.tar.gz
libADLMIDI-283c7ba09add0c0a361c22ff38897fe8c0d50332.tar.bz2
libADLMIDI-283c7ba09add0c0a361c22ff38897fe8c0d50332.zip
adlmidi_midiplay.cpp: Fixed the channel allocation logic
Diffstat (limited to 'src/adlmidi_midiplay.cpp')
-rw-r--r--src/adlmidi_midiplay.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp
index 22b1cc1..8d17eeb 100644
--- a/src/adlmidi_midiplay.cpp
+++ b/src/adlmidi_midiplay.cpp
@@ -1356,13 +1356,18 @@ int64_t MIDIplay::calculateChipChannelGoodness(size_t c, const MIDIchannel::Note
allocType = ADLMIDI_ChanAlloc_SameInst;
break;
- case Synth::VOLUME_HMI:
- case Synth::VOLUME_HMI_OLD:
- allocType = ADLMIDI_ChanAlloc_AnyReleased; // HMI doesn't care about the same instrument
- break;
-
default:
- allocType = ADLMIDI_ChanAlloc_OffDelay;
+ switch(synth.m_volumeScale)
+ {
+ case Synth::VOLUME_HMI:
+ case Synth::VOLUME_HMI_OLD:
+ allocType = ADLMIDI_ChanAlloc_AnyReleased; // HMI doesn't care about the same instrument
+ break;
+
+ default:
+ allocType = ADLMIDI_ChanAlloc_OffDelay;
+ break;
+ }
break;
}
}