summaryrefslogtreecommitdiff
path: root/libs/ardour/region.cc
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2018-09-13 14:05:47 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2018-09-13 14:05:47 -0400
commit9321f46c453b3df226f0abc8ced6415e1d3e842d (patch)
treef906186ba378d6bae64a43f994e1659bd45ba478 /libs/ardour/region.cc
parent556cf7a21520c4b1bda14bce96ecc9919a946c9d (diff)
Implement new Enclosed region equivalence mode
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r--libs/ardour/region.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index cad32cd4d7..d4afb7d9c4 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -1478,7 +1478,14 @@ Region::overlap_equivalent (boost::shared_ptr<const Region> other) const
}
bool
-Region::equivalent (boost::shared_ptr<const Region> other) const
+Region::enclosed_equivalent (boost::shared_ptr<const Region> other) const
+{
+ return (first_sample() >= other->first_sample() && last_sample() <= other->last_sample()) ||
+ (first_sample() <= other->first_sample() && last_sample() >= other->last_sample()) ;
+}
+
+bool
+Region::exact_equivalent (boost::shared_ptr<const Region> other) const
{
return _start == other->_start &&
_position == other->_position &&