fix up file renaming code a little bit
[ardour.git] / libs / ardour / ardour / audioregion.h
index 711c8030bd524892d191f9e851f2058a0cdd3fd9..d1238cb43c3aadeb06194f9418b2cd12e63c220e 100644 (file)
@@ -27,7 +27,7 @@
 #include "pbd/undo.h"
 
 #include "ardour/ardour.h"
-#include "ardour/automatable_controls.h"
+#include "ardour/automatable.h"
 #include "ardour/gain.h"
 #include "ardour/logcurve.h"
 #include "ardour/region.h"
@@ -44,6 +44,17 @@ namespace Properties {
        extern PBD::PropertyDescriptor<bool> fade_in_active;
        extern PBD::PropertyDescriptor<bool> fade_out_active;
        extern PBD::PropertyDescriptor<float> scale_amplitude;
+       extern PBD::PropertyDescriptor<float> scale_amplitude;
+
+       /* the envelope and fades are not scalar items and so
+          currently (2010/02) are not stored using Property.
+          However, these descriptors enable us to notify
+          about changes to them via PropertyChange.
+       */
+
+       extern PBD::PropertyDescriptor<bool> envelope;
+       extern PBD::PropertyDescriptor<bool> fade_in;
+       extern PBD::PropertyDescriptor<bool> fade_out;
 }
 
 class Route;
@@ -58,14 +69,6 @@ class AudioRegion : public Region
   public:
        static void make_property_quarks ();
 
-       static PBD::PropertyChange FadeInChanged;
-       static PBD::PropertyChange FadeOutChanged;
-       static PBD::PropertyChange FadeInActiveChanged;
-       static PBD::PropertyChange FadeOutActiveChanged;
-       static PBD::PropertyChange EnvelopeActiveChanged;
-       static PBD::PropertyChange ScaleAmplitudeChanged;
-       static PBD::PropertyChange EnvelopeChanged;
-
        ~AudioRegion();
 
        void copy_settings (boost::shared_ptr<const AudioRegion>);
@@ -104,7 +107,6 @@ class AudioRegion : public Region
        };
 
        virtual framecnt_t read (Sample*, framepos_t pos, framecnt_t cnt, int channel) const;
-       virtual framecnt_t read_with_ops (Sample*, framepos_t pos, framecnt_t cnt, int channel, ReadOps rops) const;
        virtual framecnt_t readable_length() const { return length(); }
 
        virtual framecnt_t read_at (Sample *buf, Sample *mixdown_buf, float *gain_buf,
@@ -119,7 +121,7 @@ class AudioRegion : public Region
        
        virtual framecnt_t read_raw_internal (Sample*, framepos_t, framecnt_t, int channel) const;
 
-       XMLNode& state (bool);
+       XMLNode& state ();
        int set_state (const XMLNode&, int version);
 
        static void set_default_fade (float steepness, framecnt_t len);
@@ -174,8 +176,14 @@ class AudioRegion : public Region
        void resume_fade_in ();
        void resume_fade_out ();
 
+       void add_transient (nframes64_t where);
+       void remove_transient (nframes64_t where);
+       int set_transients (AnalysisFeatureList&);
        int get_transients (AnalysisFeatureList&, bool force_new = false);
-       std::list<std::pair<frameoffset_t, framecnt_t> > find_silence (Sample, framecnt_t) const;
+       int update_transient (nframes64_t old_position, nframes64_t new_position);
+       int adjust_transients (nframes64_t delta);
+
+       std::list<std::pair<frameoffset_t, framecnt_t> > find_silence (Sample, framecnt_t, InterThreadInfo&) const;
 
   private:
        friend class RegionFactory;
@@ -185,8 +193,7 @@ class AudioRegion : public Region
        AudioRegion (const SourceList &);
        AudioRegion (boost::shared_ptr<const AudioRegion>, frameoffset_t offset = 0, bool offset_relative = true);
        AudioRegion (boost::shared_ptr<const AudioRegion>, const SourceList&);
-       AudioRegion (boost::shared_ptr<AudioSource>, const XMLNode&);
-       AudioRegion (SourceList &, const XMLNode&);
+       AudioRegion (SourceList &);
 
   private:
        PBD::Property<bool>     _envelope_active;
@@ -197,7 +204,6 @@ class AudioRegion : public Region
        PBD::Property<gain_t>   _scale_amplitude;
        
        void register_properties ();
-       PBD::PropertyChange set_property (const PBD::PropertyBase& prop);
        void post_set ();
 
        void init ();
@@ -227,7 +233,7 @@ class AudioRegion : public Region
        void connect_to_analysis_changed ();
        void connect_to_header_position_offset_changed ();
 
-       AutomatableControls _automatable;
+       Automatable _automatable;
 
        boost::shared_ptr<AutomationList> _fade_in;
        boost::shared_ptr<AutomationList> _fade_out;