summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/region.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-12-27 01:42:49 +0000
committerCarl Hetherington <carl@carlh.net>2011-12-27 01:42:49 +0000
commit6304261b980419eaafde84bc32ff5e8f1c7aa236 (patch)
tree1261360e5eb22f7539a1a0afcc2d760ea017b7ad /libs/ardour/ardour/region.h
parent0082e3364f7682ff41df52305cfff2cf7a861ef3 (diff)
Re-work layering in possibly debatable ways. Sketchy docs in doc/layering.
git-svn-id: svn://localhost/ardour2/branches/3.0@11088 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/region.h')
-rw-r--r--libs/ardour/ardour/region.h29
1 files changed, 14 insertions, 15 deletions
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index a9d18f95ca..4315ed7aa8 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -112,6 +112,7 @@ class Region
framepos_t start () const { return _start; }
framecnt_t length () const { return _length; }
layer_t layer () const { return _layer; }
+ Evoral::Range<framepos_t> bounds () const;
framecnt_t source_length(uint32_t n) const;
uint32_t max_source_level () const;
@@ -201,7 +202,7 @@ class Region
void cut_front (framepos_t new_position);
void cut_end (framepos_t new_position);
- void set_layer (layer_t l); /* ONLY Playlist can call this */
+ void set_layer (layer_t l); /* ONLY Playlist should call this */
void raise ();
void lower ();
void raise_to_top ();
@@ -251,8 +252,8 @@ class Region
virtual boost::shared_ptr<Region> get_parent() const;
- uint64_t last_layer_op() const { return _last_layer_op; }
- void set_last_layer_op (uint64_t when);
+ uint64_t last_layer_op (LayerOp) const;
+ void set_last_layer_op (LayerOp, uint64_t);
virtual bool is_dependent() const { return false; }
virtual bool depends_on (boost::shared_ptr<Region> /*other*/) const { return false; }
@@ -293,16 +294,13 @@ class Region
void invalidate_transients ();
- void set_pending_explicit_relayer (bool p) {
- _pending_explicit_relayer = p;
- }
+ void drop_sources ();
- bool pending_explicit_relayer () const {
- return _pending_explicit_relayer;
+ /** @return our bounds the last time our relayer() method was called */
+ Evoral::Range<framepos_t> last_relayer_bounds () const {
+ return Evoral::Range<framepos_t> (_last_relayer_bounds_from, _last_relayer_bounds_to);
}
- void drop_sources ();
-
protected:
friend class RegionFactory;
@@ -387,16 +385,17 @@ class Region
PBD::Property<float> _shift;
PBD::EnumProperty<PositionLockStyle> _position_lock_style;
+ /* XXX: could use a Evoral::Range<> but I'm too lazy to make PBD::Property serialize such a thing nicely */
+ PBD::Property<framepos_t> _last_relayer_bounds_from; ///< from of our bounds last time relayer() was called
+ PBD::Property<framepos_t> _last_relayer_bounds_to; ///< to of our bounds last time relayer() was called
+ PBD::Property<uint64_t> _last_layer_op_add;
+ PBD::Property<uint64_t> _last_layer_op_bounds_change;
+
framecnt_t _last_length;
framepos_t _last_position;
mutable RegionEditState _first_edit;
Timecode::BBT_Time _bbt_time;
- uint64_t _last_layer_op; ///< timestamp
-
- /** true if this region has had its layer explicitly set since the playlist last relayered */
- bool _pending_explicit_relayer;
-
void register_properties ();
void use_sources (SourceList const &);