diff options
author | Sampo Savolainen <v2@iki.fi> | 2006-03-31 21:34:22 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2006-03-31 21:34:22 +0000 |
commit | 7755c2dbfefd40697ce390e2c2f254e2122a2a39 (patch) | |
tree | 60fea9f94cc2200ce07da4db962ba5c7ea5510d1 /libs/ardour/crossfade.cc | |
parent | 6f1208036fe7eb9278b2708843c6bce817bbdf8d (diff) |
Splitting a regon now retains crossfades, even if the split happens
within a crossfade.
git-svn-id: svn://localhost/trunk/ardour2@435 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/crossfade.cc')
-rw-r--r-- | libs/ardour/crossfade.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc index 53e59dafcb..767fdd85e6 100644 --- a/libs/ardour/crossfade.cc +++ b/libs/ardour/crossfade.cc @@ -165,11 +165,8 @@ Crossfade::Crossfade (const Crossfade &orig, ARDOUR::AudioRegion *newin, ARDOUR: : _fade_in(orig._fade_in), _fade_out(orig._fade_out) { - // Signals? - _active = orig._active; _in_update = orig._in_update; - overlap_type = orig.overlap_type; _length = orig._length; _position = orig._position; _anchor_point = orig._anchor_point; @@ -180,9 +177,20 @@ Crossfade::Crossfade (const Crossfade &orig, ARDOUR::AudioRegion *newin, ARDOUR: _in = newin; _out = newout; + + // copied from Crossfade::initialize() + _in_update = false; + _out->suspend_fade_out (); + _in->suspend_fade_in (); + + overlap_type = _in->coverage (_out->position(), _out->last_frame()); + + // Let's make sure the fade isn't too long + set_length(_length); } + Crossfade::~Crossfade () { for (StateMap::iterator i = states.begin(); i != states.end(); ++i) { |