Crossfade::Crossfade (boost::shared_ptr<AudioRegion> in, boost::shared_ptr<AudioRegion> out,
framecnt_t length,
- framepos_t position,
AnchorPoint ap)
- : AudioRegion (in->session(), position, length, in->name() + string ("<>") + out->name())
+ : AudioRegion (in->session(), 0, length, in->name() + string ("<>") + out->name())
, CROSSFADE_DEFAULT_PROPERTIES
, _fade_in (Evoral::Parameter(FadeInAutomation)) // linear (gain coefficient) => -inf..+6dB
, _fade_out (Evoral::Parameter(FadeOutAutomation)) // linear (gain coefficient) => -inf..+6dB
} 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;
_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;
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;
_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;
PropertyChange what_changed;
framepos_t val;
- if ((prop = node.property (X_("id")))) {
- _id = prop->value();
- }
+ set_id (node);
if ((prop = node.property ("position")) != 0) {
sscanf (prop->value().c_str(), "%" PRId64, &val);