X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fmidi_playlist.cc;h=89b59147533c677a6c064532d0e284cdaea6640c;hb=2b9dc7b380bb4e40171067f42b4010970869a57d;hp=b230f6f6d55d44e2cfaa300e21c64057668c689a;hpb=8687895abba4209a6de8d8a8fc1bda5996f0d875;p=ardour.git diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc index b230f6f6d5..89b5914753 100644 --- a/libs/ardour/midi_playlist.cc +++ b/libs/ardour/midi_playlist.cc @@ -23,7 +23,6 @@ #include #include -#include #include "evoral/EventList.hpp" @@ -40,6 +39,7 @@ #include "i18n.h" using namespace ARDOUR; +using namespace PBD; using namespace std; MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden) @@ -56,27 +56,25 @@ MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden) MidiPlaylist::MidiPlaylist (Session& session, string name, bool hidden) : Playlist (session, name, DataType::MIDI, hidden) + , _note_mode(Sustained) { } MidiPlaylist::MidiPlaylist (boost::shared_ptr other, string name, bool hidden) : Playlist (other, name, hidden) + , _note_mode(other->_note_mode) { } MidiPlaylist::MidiPlaylist (boost::shared_ptr other, nframes_t start, nframes_t dur, string name, bool hidden) - : Playlist (other, start, dur, name, hidden) + : Playlist (other, start, dur, name, hidden) + , _note_mode(other->_note_mode) { /* this constructor does NOT notify others (session) */ } MidiPlaylist::~MidiPlaylist () { - GoingAway (); /* EMIT SIGNAL */ - - /* drop connections to signals */ - - notify_callbacks (); } template @@ -165,11 +163,11 @@ MidiPlaylist::read (MidiRingBuffer& dst, nframes_t start, nframes_t d DEBUG_TRACE (DEBUG::MidiPlaylistIO, "\tBEFORE: new tracker\n"); } else { tracker = t->second; - DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tBEFORE: tracker says there are %1 on notes", tracker->on())); + DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tBEFORE: tracker says there are %1 on notes\n", tracker->on())); } mr->read_at (dst, start, dur, chan_n, _note_mode, tracker); - DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tAFTER: tracker says there are %1 on notes", tracker->on())); + DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tAFTER: tracker says there are %1 on notes\n", tracker->on())); if (new_tracker) { pair newpair; @@ -421,7 +419,7 @@ MidiPlaylist::contained_automation() bool -MidiPlaylist::region_changed (Change what_changed, boost::shared_ptr region) +MidiPlaylist::region_changed (const PBD::PropertyChange& what_changed, boost::shared_ptr region) { if (in_flush || in_set_state) { return false; @@ -429,19 +427,14 @@ MidiPlaylist::region_changed (Change what_changed, boost::shared_ptr reg // Feeling rather uninterested today, but thanks for the heads up anyway! - Change our_interests = Change (/*MidiRegion::FadeInChanged| - MidiRegion::FadeOutChanged| - MidiRegion::FadeInActiveChanged| - MidiRegion::FadeOutActiveChanged| - MidiRegion::EnvelopeActiveChanged| - MidiRegion::ScaleAmplitudeChanged| - MidiRegion::EnvelopeChanged*/); + PBD::PropertyChange our_interests; + bool parent_wants_notify; parent_wants_notify = Playlist::region_changed (what_changed, region); - if ((parent_wants_notify || (what_changed & our_interests))) { - notify_modified (); + if (parent_wants_notify || what_changed.contains (our_interests)) { + notify_contents_changed (); } return true;