summaryrefslogtreecommitdiff
path: root/libs/ardour/audioregion.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/audioregion.cc')
-rw-r--r--libs/ardour/audioregion.cc37
1 files changed, 33 insertions, 4 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index 86844deed1..28e3d5a6d9 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -710,6 +710,8 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
Region::set_live_state (node, what_changed, false);
uint32_t old_flags = _flags;
+
+ cerr << _name << " setting live state\n";
if ((prop = node.property ("flags")) != 0) {
_flags = Flag (string_2_enum (prop->value(), _flags));
@@ -761,17 +763,44 @@ AudioRegion::set_live_state (const XMLNode& node, Change& what_changed, bool sen
_fade_in.clear ();
- if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0 || _fade_in.set_state (*child)) {
+ if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) {
set_default_fade_in ();
- }
+ } else {
+ XMLNode* grandchild = child->child ("AutomationList");
+ if (grandchild) {
+ _fade_in.set_state (*grandchild);
+ }
+ }
+
+ if ((prop = child->property ("active")) != 0) {
+ if (prop->value() == "yes") {
+ set_fade_in_active (true);
+ } else {
+ set_fade_in_active (true);
+ }
+ }
} else if (child->name() == "FadeOut") {
_fade_out.clear ();
- if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0 || _fade_out.set_state (*child)) {
+ if ((prop = child->property ("default")) != 0 || (prop = child->property ("steepness")) != 0) {
set_default_fade_out ();
- }
+ } else {
+ XMLNode* grandchild = child->child ("AutomationList");
+ if (grandchild) {
+ _fade_out.set_state (*grandchild);
+ }
+ }
+
+ if ((prop = child->property ("active")) != 0) {
+ if (prop->value() == "yes") {
+ set_fade_out_active (true);
+ } else {
+ set_fade_out_active (false);
+ }
+ }
+
}
}