diff options
author | Vitaly Novichkov <Wohlstand@users.noreply.github.com> | 2019-02-22 18:07:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-22 18:07:00 +0300 |
commit | 5423427c6f2e3be878fee9de8dc9784837cd6fbb (patch) | |
tree | 5dfcfbd8fe92528a10fe525e878f75119f0c9257 | |
parent | 626fa9d96462ec43c1aea71ed5ab5bd8a680a5d1 (diff) | |
parent | 6a5e3c90526a96f0f028c60ac9e3d9dab4b9056a (diff) | |
download | libADLMIDI-5423427c6f2e3be878fee9de8dc9784837cd6fbb.tar.gz libADLMIDI-5423427c6f2e3be878fee9de8dc9784837cd6fbb.tar.bz2 libADLMIDI-5423427c6f2e3be878fee9de8dc9784837cd6fbb.zip |
Merge pull request #204 from jpcima/work
prevent duplicate locations in users sets
-rw-r--r-- | src/adlmidi_midiplay.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index f1a0c56..ae37e06 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1569,6 +1569,10 @@ void MIDIplay::killOrEvacuate(size_t from_channel, if(adlch.users.size() == adlch.users.capacity()) continue; // no room for more arpeggio on channel + if(!m_chipChannels[cs].find_user(jd.loc).is_end()) + continue; // channel already has this note playing (sustained) + // avoid introducing a duplicate location. + for(AdlChannel::users_iterator m = adlch.users.begin(); !m.is_end(); ++m) { AdlChannel::LocationData &mv = m->value; |