From: David Robillard Date: Thu, 19 Feb 2015 20:55:16 +0000 (-0500) Subject: Don't allocate then discard notes on note off. X-Git-Tag: 4.0-rc1~416 X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=commitdiff_plain;h=6fb4bd578ef30fc65c06b98c32a3278d9c443696 Don't allocate then discard notes on note off. Silly to make a junk Note just to pass to append_note_off_unlocked, which just uses the fields that are on the MIDIEvent anyway then throws it away. Also explicitly dispatch to append_note_off_unlocked in the caller for note ons with velocity 0 rather than make append_note_on_unlocked deal with it. --- diff --git a/libs/evoral/evoral/Sequence.hpp b/libs/evoral/evoral/Sequence.hpp index 4e6420fbb1..639a85730c 100644 --- a/libs/evoral/evoral/Sequence.hpp +++ b/libs/evoral/evoral/Sequence.hpp @@ -331,11 +331,11 @@ private: bool overlaps_unlocked (const NotePtr& ev, const NotePtr& ignore_this_note) const; bool contains_unlocked (const NotePtr& ev) const; - void append_note_on_unlocked (NotePtr, Evoral::event_id_t); - void append_note_off_unlocked(NotePtr); + void append_note_on_unlocked(const MIDIEvent