diff options
author | Wohlstand <admin@wohlnet.ru> | 2025-05-23 01:21:06 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2025-05-23 01:26:03 +0300 |
commit | c09823a10cd31fc12764bb5406f0a43ed38a1a3d (patch) | |
tree | 48e6a6df819d23a3f44c59ce0b4522dd27f28c50 /src/adlmidi_midiplay.hpp | |
parent | 3520c0d82863cdafafc0cff26f7909dea4840ad9 (diff) | |
download | libADLMIDI-c09823a10cd31fc12764bb5406f0a43ed38a1a3d.tar.gz libADLMIDI-c09823a10cd31fc12764bb5406f0a43ed38a1a3d.tar.bz2 libADLMIDI-c09823a10cd31fc12764bb5406f0a43ed38a1a3d.zip |
Experiment: Allow multiple note dupes on same channel
Should fix the problem of some of Heretic songs
Diffstat (limited to 'src/adlmidi_midiplay.hpp')
-rw-r--r-- | src/adlmidi_midiplay.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/adlmidi_midiplay.hpp b/src/adlmidi_midiplay.hpp index dd5b34e..6ab0915 100644 --- a/src/adlmidi_midiplay.hpp +++ b/src/adlmidi_midiplay.hpp @@ -311,6 +311,14 @@ public: return it; } + notes_iterator create_activenote(unsigned note) + { + NoteInfo ni; + ni.note = note; + notes_iterator it = activenotes.insert(activenotes.end(), ni); + return it; + } + notes_iterator ensure_find_or_create_activenote(unsigned note) { notes_iterator it = find_or_create_activenote(note); @@ -318,6 +326,13 @@ public: return it; } + notes_iterator ensure_create_activenote(unsigned note) + { + notes_iterator it = create_activenote(note); + assert(!it.is_end()); + return it; + } + /** * @brief Reset channel into initial state */ |