#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"
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;
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>);
};
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,
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);
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;
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;
PBD::Property<gain_t> _scale_amplitude;
void register_properties ();
- PBD::PropertyChange set_property (const PBD::PropertyBase& prop);
void post_set ();
void init ();
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;