diff options
author | Carl Hetherington <carl@carlh.net> | 2011-08-29 16:00:17 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-08-29 16:00:17 +0000 |
commit | 9b7ae4cccc8507bc3e74e909b738a5b87a2b717b (patch) | |
tree | 629217ce89cc81752e68ee5958f8157e584b0d01 | |
parent | 52e3e5bdc9e1f6f4ae7c1c49a343636314425820 (diff) |
Ensure that the fade curves are updated when the xfade
length changes; should fix #4260.
git-svn-id: svn://localhost/ardour2/branches/3.0@10028 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/crossfade.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/ardour/crossfade.cc b/libs/ardour/crossfade.cc index 9cbbbf1898..dc8d3e3c52 100644 --- a/libs/ardour/crossfade.cc +++ b/libs/ardour/crossfade.cc @@ -586,8 +586,8 @@ Crossfade::compute (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioReg } else { _position = top->last_frame() - short_xfade_length; } - - _length = min (short_xfade_length, top->length()); + + set_xfade_length (min (short_xfade_length, top->length())); _follow_overlap = false; _anchor_point = EndOfIn; _active = true; @@ -621,7 +621,7 @@ Crossfade::compute (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioReg _in = top; _out = bottom; _position = top->first_frame(); - _length = min (short_xfade_length, top->length()); + set_xfade_length (min (short_xfade_length, top->length())); _follow_overlap = false; _anchor_point = StartOfIn; _active = true; @@ -670,11 +670,11 @@ Crossfade::compute (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioReg if (model == FullCrossfade) { _position = bottom->first_frame(); // "{" - _length = _out->first_frame() + _out->length() - _in->first_frame(); + set_xfade_length (_out->first_frame() + _out->length() - _in->first_frame()); /* leave active alone */ _follow_overlap = true; } else { - _length = min (short_xfade_length, top->length()); + set_xfade_length (min (short_xfade_length, top->length())); _position = top->last_frame() - _length; // "]" - length _active = true; _follow_overlap = false; @@ -694,11 +694,11 @@ Crossfade::compute (boost::shared_ptr<AudioRegion> a, boost::shared_ptr<AudioReg _anchor_point = StartOfIn; if (model == FullCrossfade) { - _length = _out->first_frame() + _out->length() - _in->first_frame(); + set_xfade_length (_out->first_frame() + _out->length() - _in->first_frame()); /* leave active alone */ _follow_overlap = true; } else { - _length = min (short_xfade_length, top->length()); + set_xfade_length (min (short_xfade_length, top->length())); _active = true; _follow_overlap = false; |