X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fplaylist.cc;h=bb79801c9f0b45342f7de4e3d3650aa19d082af3;hb=d89573f8e73ee7f0c28a6b9a8b8ba0f8e78c69aa;hp=8a19b1fcebdf1f60fba36f03564106c47141aed1;hpb=6930071cdbccf78f3871027991355a3fc524ba4b;p=ardour.git diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 8a19b1fceb..bb79801c9f 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -250,7 +250,7 @@ Playlist::Playlist (boost::shared_ptr other, framepos_t start, f plist.add (Properties::layer, region->layer()); plist.add (Properties::layering_index, region->layering_index()); - new_region = RegionFactory::RegionFactory::create (region, plist); + new_region = RegionFactory::create (region, plist); add_region_internal (new_region, position); } @@ -284,7 +284,7 @@ Playlist::copy_regions (RegionList& newlist) const RegionReadLock rlock (const_cast (this)); for (RegionList::const_iterator i = regions.begin(); i != regions.end(); ++i) { - newlist.push_back (RegionFactory::RegionFactory::create (*i, true)); + newlist.push_back (RegionFactory::create (*i, true)); } } @@ -751,10 +751,6 @@ Playlist::flush_notifications (bool from_undo) notify_region_added (region); - if (!holding_state ()) { - check_crossfades (region->range ()); - } - region->PropertyChanged.connect_same_thread (region_state_changed_connections, boost::bind (&Playlist::region_changed_proxy, this, _1, boost::weak_ptr (region))); return true; @@ -848,6 +844,17 @@ Playlist::flush_notifications (bool from_undo) } } + void + Playlist::get_source_equivalent_regions (boost::shared_ptr other, vector >& results) + { + for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { + + if ((*i) && (*i)->any_source_equivalent (other)) { + results.push_back (*i); + } + } + } + void Playlist::partition (framepos_t start, framepos_t end, bool cut) { @@ -1095,8 +1102,6 @@ Playlist::flush_notifications (bool from_undo) in_partition = false; } - - check_crossfades (Evoral::Range (start, end)); } boost::shared_ptr @@ -1553,10 +1558,6 @@ Playlist::flush_notifications (bool from_undo) save = !(_splicing || _nudging); } - if (what_changed.contains (our_interests) && !what_changed.contains (pos_and_length)) { - check_crossfades (region->range ()); - } - if (what_changed.contains (Properties::position) && !what_changed.contains (Properties::length)) { notify_region_moved (region); } else if (!what_changed.contains (Properties::position) && what_changed.contains (Properties::length)) { @@ -2100,15 +2101,6 @@ Playlist::find_next_region (framepos_t frame, RegionPoint point, int dir) if (seen_region_nodes && regions.empty()) { ret = -1; - } else { - - /* update dependents, which was not done during add_region_internal - due to in_set_state being true - */ - - for (RegionList::iterator r = regions.begin(); r != regions.end(); ++r) { - check_crossfades ((*r)->range ()); - } } thaw (); @@ -2421,7 +2413,6 @@ Playlist::raise_region (boost::shared_ptr region) { set_layer (region, region->layer() + 1.5); relayer (); - check_crossfades (region->range ()); } void @@ -2429,7 +2420,6 @@ Playlist::lower_region (boost::shared_ptr region) { set_layer (region, region->layer() - 1.5); relayer (); - check_crossfades (region->range ()); } void @@ -2437,7 +2427,6 @@ Playlist::raise_region_to_top (boost::shared_ptr region) { set_layer (region, DBL_MAX); relayer (); - check_crossfades (region->range ()); } void @@ -2445,7 +2434,6 @@ Playlist::lower_region_to_bottom (boost::shared_ptr region) { set_layer (region, -0.5); relayer (); - check_crossfades (region->range ()); } void @@ -2837,6 +2825,7 @@ Playlist::combine (const RegionList& r) /* make position relative to zero */ pl->add_region (copied_region, original_region->position() - earliest_position); + copied_region->set_layer (original_region->layer ()); /* use the maximum number of channels for any region */ @@ -3114,10 +3103,6 @@ restart: } } } - - for (list >::iterator i = ranges.begin(); i != ranges.end(); ++i) { - check_crossfades (*i); - } } void