summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/region.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-04-16 16:32:22 +0000
committerCarl Hetherington <carl@carlh.net>2012-04-16 16:32:22 +0000
commita2897ecef6da6a458aa1de8c2d9973a1e809dca2 (patch)
tree189e34b829823fc73d11fba249f283e00336d44d /libs/ardour/ardour/region.h
parent02c498a8fa1c2e47988a256321bdcf5e9e869de1 (diff)
Fairly major change to the way in which crossfades are handled;
they are now done with region fades, rather than separate objects. After this commit, Ardour will try to convert your session files to the new crossfade format, but will make a backup in your session folder first. If you have works in progress using Ardour 3 it is ***STRONGLY RECOMMENDED*** that you back up session files before updating to this commit. git-svn-id: svn://localhost/ardour2/branches/3.0@11986 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/region.h')
-rw-r--r--libs/ardour/ardour/region.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index a238ff9038..788a8d90c9 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -141,6 +141,14 @@ class Region
framepos_t first_frame () const { return _position; }
framepos_t last_frame () const { return _position + _length - 1; }
+ Evoral::Range<framepos_t> last_range () const {
+ return Evoral::Range<framepos_t> (_last_position, _last_position + _last_length - 1);
+ }
+
+ Evoral::Range<framepos_t> range () const {
+ return Evoral::Range<framepos_t> (first_frame(), last_frame());
+ }
+
bool hidden () const { return _hidden; }
bool muted () const { return _muted; }
bool opaque () const { return _opaque; }
@@ -168,8 +176,14 @@ class Region
return first_frame() <= frame && frame <= last_frame();
}
- OverlapType coverage (framepos_t start, framepos_t end) const {
- return ARDOUR::coverage (first_frame(), last_frame(), start, end);
+ /** @return coverage of this region with the given range;
+ * OverlapInternal: the range is internal to this region.
+ * OverlapStart: the range overlaps the start of this region.
+ * OverlapEnd: the range overlaps the end of this region.
+ * OverlapExternal: the range overlaps all of this region.
+ */
+ Evoral::OverlapType coverage (framepos_t start, framepos_t end) const {
+ return Evoral::coverage (first_frame(), last_frame(), start, end);
}
bool equivalent (boost::shared_ptr<const Region>) const;