diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 7b6d576f35..a8e6ddc05b 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -701,25 +701,23 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen _envelope.set_max_xval (_length); _envelope.truncate_end (_length); + cerr << "envelope for " << _name << " has " << _envelope.size() << " points\n"; + } else if (child->name() == "FadeIn") { _fade_in.clear (); - if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) { + if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0 || _fade_in.set_state (*child)) { set_default_fade_in (); - } else { - _fade_in.set_state (*child); - } + } } else if (child->name() == "FadeOut") { _fade_out.clear (); - if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) { + if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0 || _fade_out.set_state (*child)) { set_default_fade_out (); - } else { - _fade_out.set_state (*child); - } + } } } diff --git a/libs/ardour/automation_event.cc b/libs/ardour/automation_event.cc index 1d61f90d9d..a2eeebed56 100644 --- a/libs/ardour/automation_event.cc +++ b/libs/ardour/automation_event.cc @@ -1254,7 +1254,7 @@ AutomationList::set_state (const XMLNode& node) return deserialize_events (node); } - if (node.name() == X_("Envelope")) { + if (node.name() == X_("Envelope") || node.name() == X_("FadeOut") || node.name() == X_("FadeIn")) { /* old school */