X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fregion.h;h=3dab0f46def994e0b20e081dbc1c9a13786ef87b;hb=c45d19494f699ff0142ccbeb1fdd3dee79bfdbff;hp=2cf9bab97b6905c93cde04707811389b75efac2b;hpb=dc815ea8e84d28fc01a68225c2ece4399c4a9c7e;p=ardour.git diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 2cf9bab97b..3dab0f46de 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -52,6 +52,7 @@ namespace Properties { extern PBD::PropertyDescriptor right_of_split; extern PBD::PropertyDescriptor hidden; extern PBD::PropertyDescriptor position_locked; + extern PBD::PropertyDescriptor valid_transients; extern PBD::PropertyDescriptor start; extern PBD::PropertyDescriptor length; extern PBD::PropertyDescriptor position; @@ -61,6 +62,7 @@ namespace Properties { extern PBD::PropertyDescriptor ancestral_length; extern PBD::PropertyDescriptor stretch; extern PBD::PropertyDescriptor shift; + extern PBD::PropertyDescriptor position_lock_style; }; class Playlist; @@ -84,11 +86,6 @@ class Region static void make_property_quarks (); - enum PositionLockStyle { - AudioTime, - MusicTime - }; - static PBD::Signal2, const PBD::PropertyChange&> RegionPropertyChanged; PBD::PropertyList* property_factory (const XMLNode&) const; @@ -99,6 +96,8 @@ class Region bool set_name (const std::string& str); const DataType& data_type() const { return _type; } + + AnalysisFeatureList transients () { return _transients; }; /** How the region parameters play together: * @@ -141,6 +140,7 @@ class Region bool opaque () const { return _opaque; } bool locked() const { return _locked; } bool position_locked() const { return _position_locked; } + bool valid_transients() const { return _valid_transients; } bool automatic() const { return _automatic; } bool whole_file() const { return _whole_file; } bool captured() const { return !(_import || _external); } @@ -149,7 +149,7 @@ class Region bool external() const { return _external; } bool import() const { return _import; } - PositionLockStyle positional_lock_style() const { return _positional_lock_style; } + PositionLockStyle position_lock_style() const { return _position_lock_style; } void set_position_lock_style (PositionLockStyle ps); void recompute_position_from_lock_style (); @@ -249,12 +249,35 @@ class Region virtual int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&) = 0; + virtual void add_transient (nframes64_t where) { + // no transients, but its OK + } + + virtual int update_transient (nframes64_t old_position, nframes64_t new_position) { + // no transients, but its OK + return 0; + } + + virtual void remove_transient (nframes64_t where) { + // no transients, but its OK + } + + virtual int set_transients (AnalysisFeatureList&) { + // no transients, but its OK + return 0; + } + virtual int get_transients (AnalysisFeatureList&, bool force_new = false) { (void) force_new; // no transients, but its OK return 0; } + virtual int adjust_transients (nframes64_t delta) { + // no transients, but its OK + return 0; + } + virtual int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr >&) const { return 0; @@ -270,6 +293,8 @@ class Region return _pending_explicit_relayer; } + void drop_sources (); + protected: friend class RegionFactory; @@ -319,6 +344,7 @@ class Region PBD::Property _right_of_split; PBD::Property _hidden; PBD::Property _position_locked; + PBD::Property _valid_transients; PBD::Property _start; PBD::Property _length; PBD::Property _position; @@ -328,14 +354,14 @@ class Region PBD::Property _ancestral_length; PBD::Property _stretch; PBD::Property _shift; + PBD::EnumProperty _position_lock_style; framecnt_t _last_length; framepos_t _last_position; - PositionLockStyle _positional_lock_style; mutable RegionEditState _first_edit; BBT_Time _bbt_time; AnalysisFeatureList _transients; - bool _valid_transients; + mutable uint64_t _read_data_count; ///< modified in read() uint64_t _last_layer_op; ///< timestamp SourceList _sources; @@ -351,7 +377,7 @@ class Region void register_properties (); -private: +protected: void use_sources (SourceList const &); };