summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-04-29 13:00:45 +0000
committerCarl Hetherington <carl@carlh.net>2012-04-29 13:00:45 +0000
commitec82de75b64acc29fb779fc226a72fa9bf472a88 (patch)
tree10df77340c79dd454174b2cad69483622b734c31 /libs
parentbed5cf33445714c51425e9f02adaae6495e0201e (diff)
Handle update of crossfades on explicit relayer more efficiently.
git-svn-id: svn://localhost/ardour2/branches/3.0@12119 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/playlist.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index 3b29842aeb..076c4f27ca 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -32,6 +32,7 @@
#include "pbd/failed_constructor.h"
#include "pbd/stateful_diff_command.h"
#include "pbd/xml++.h"
+#include "pbd/stacktrace.h"
#include "ardour/debug.h"
#include "ardour/playlist.h"
@@ -2279,14 +2280,7 @@ Playlist::setup_layering_indices (RegionList const & regions)
for (RegionList::const_iterator k = regions.begin(); k != regions.end(); ++k) {
(*k)->set_layering_index (j++);
-
- Evoral::Range<framepos_t> r ((*k)->first_frame(), (*k)->last_frame());
- xf.push_back (r);
}
-
- /* now recheck the entire playlist for crossfades */
-
- coalesce_and_check_crossfades (xf);
}
/** Take the layering indices of each of our regions, compute the layers
@@ -2404,7 +2398,7 @@ Playlist::relayer ()
notify_layering_changed ();
/* This relayer() may have been called as a result of a region removal, in which
- case we need to setup layering indices so account for the one that has just
+ case we need to setup layering indices to account for the one that has just
gone away.
*/
setup_layering_indices (copy);
@@ -2415,6 +2409,7 @@ Playlist::raise_region (boost::shared_ptr<Region> region)
{
set_layer (region, region->layer() + 1.5);
relayer ();
+ check_crossfades (region->range ());
}
void
@@ -2422,6 +2417,7 @@ Playlist::lower_region (boost::shared_ptr<Region> region)
{
set_layer (region, region->layer() - 1.5);
relayer ();
+ check_crossfades (region->range ());
}
void
@@ -2429,6 +2425,7 @@ Playlist::raise_region_to_top (boost::shared_ptr<Region> region)
{
set_layer (region, DBL_MAX);
relayer ();
+ check_crossfades (region->range ());
}
void
@@ -2436,6 +2433,7 @@ Playlist::lower_region_to_bottom (boost::shared_ptr<Region> region)
{
set_layer (region, -0.5);
relayer ();
+ check_crossfades (region->range ());
}
void
@@ -3076,6 +3074,9 @@ Playlist::set_orig_track_id (const PBD::ID& id)
_orig_track_id = id;
}
+/** Take a list of ranges, coalesce any that can be coalesced, then call
+ * check_crossfades for each one.
+ */
void
Playlist::coalesce_and_check_crossfades (list<Evoral::Range<framepos_t> > ranges)
{