diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2018-11-10 20:06:52 +0100 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2018-11-10 20:06:52 +0100 |
commit | 429853a91ba46b03eba739445d075fe2cbc45df4 (patch) | |
tree | 1adb92401031ff319c6cf336f5d98f181b73ec22 /src/adlmidi_midiplay.cpp | |
parent | c2f914ddfa09f8fa1b2f93eb264b536ac6a85699 (diff) | |
download | libADLMIDI-429853a91ba46b03eba739445d075fe2cbc45df4.tar.gz libADLMIDI-429853a91ba46b03eba739445d075fe2cbc45df4.tar.bz2 libADLMIDI-429853a91ba46b03eba739445d075fe2cbc45df4.zip |
enable more debugging checks
Diffstat (limited to 'src/adlmidi_midiplay.cpp')
-rw-r--r-- | src/adlmidi_midiplay.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 370f723..cebea6a 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -469,7 +469,7 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity) if(isBlankNote) { // Don't even try to play the blank instrument! But, insert the dummy note. - MIDIchannel::notes_iterator i = midiChan.find_or_create_activenote(note); + MIDIchannel::notes_iterator i = midiChan.ensure_find_or_create_activenote(note); MIDIchannel::NoteInfo &dummy = i->value; dummy.isBlank = true; dummy.ains = NULL; @@ -566,7 +566,7 @@ bool MIDIplay::realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity) velocity = static_cast<uint8_t>(std::floor(static_cast<float>(velocity) * 0.8f)); // Allocate active note for MIDI channel - MIDIchannel::notes_iterator ir = midiChan.find_or_create_activenote(note); + MIDIchannel::notes_iterator ir = midiChan.ensure_find_or_create_activenote(note); MIDIchannel::NoteInfo &ni = ir->value; ni.vol = velocity; ni.vibrato = midiChan.noteAftertouch[note]; |