Use a few shared_ptrs to make things slightly neater.
[ardour.git] / libs / ardour / crossfade.cc
index dc8d3e3c526f2ec6c2332bb2f9f6ccb13d73e5a0..b2301b7167bed7cfb12208277e041bcf1e72c713 100644 (file)
@@ -85,9 +85,8 @@ Crossfade::operator== (const Crossfade& other)
 
 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
@@ -778,9 +777,7 @@ Crossfade::set_state (const XMLNode& node, int /*version*/)
        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);