diff options
author | Carl Hetherington <carl@carlh.net> | 2012-01-31 23:06:12 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-01-31 23:06:12 +0000 |
commit | 34881407e7dd687623fbabfe0ae3aee7099eb352 (patch) | |
tree | 59720eaf55c85ddef90d8b605e21560a1f268de6 /libs | |
parent | 40a8ed88084eb36922dbdc530db75a323843863a (diff) |
Make crossfade active state and length changes undo-able.
git-svn-id: svn://localhost/ardour2/branches/3.0@11406 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/crossfade.h | 1 | ||||
-rw-r--r-- | libs/ardour/crossfade.cc | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/libs/ardour/ardour/crossfade.h b/libs/ardour/ardour/crossfade.h index 20bbcccdf5..1c7075eb7d 100644 --- a/libs/ardour/ardour/crossfade.h +++ b/libs/ardour/ardour/crossfade.h @@ -164,6 +164,7 @@ class Crossfade : public ARDOUR::AudioRegion static Sample* crossfade_buffer_in; void initialize (); + void register_properties (); int compute (boost::shared_ptr<ARDOUR::AudioRegion>, boost::shared_ptr<ARDOUR::AudioRegion>, CrossfadeModel); bool update (); diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc index b2301b7167..902627933b 100644 --- a/libs/ardour/crossfade.cc +++ b/libs/ardour/crossfade.cc @@ -92,6 +92,8 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> in, boost::shared_ptr<Audio , _fade_out (Evoral::Parameter(FadeOutAutomation)) // linear (gain coefficient) => -inf..+6dB { + register_properties (); + _in = in; _out = out; _anchor_point = ap; @@ -107,6 +109,8 @@ Crossfade::Crossfade (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioR , _fade_in (Evoral::Parameter(FadeInAutomation)) // linear (gain coefficient) => -inf..+6dB , _fade_out (Evoral::Parameter(FadeOutAutomation)) // linear (gain coefficient) => -inf..+6dB { + register_properties (); + _in_update = false; _fixed = false; _follow_overlap = false; @@ -127,6 +131,8 @@ Crossfade::Crossfade (const Playlist& playlist, XMLNode const & node) , _fade_out (Evoral::Parameter(FadeOutAutomation)) // linear (gain coefficient) => -inf..+6dB { + register_properties (); + boost::shared_ptr<Region> r; XMLProperty const * prop; LocaleGuard lg (X_("POSIX")); @@ -197,6 +203,8 @@ Crossfade::Crossfade (boost::shared_ptr<Crossfade> orig, boost::shared_ptr<Audio , _fade_in (orig->_fade_in) , _fade_out (orig->_fade_out) { + register_properties (); + _active = orig->_active; _in_update = orig->_in_update; _anchor_point = orig->_anchor_point; @@ -225,6 +233,13 @@ Crossfade::~Crossfade () } void +Crossfade::register_properties () +{ + add_property (_active); + add_property (_follow_overlap); +} + +void Crossfade::initialize () { /* merge source lists from regions */ |