summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2016-04-10 18:19:54 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2016-05-31 15:30:40 -0400
commit5499bad8369a1ac7b0b1aa5ba95f27d4658182a2 (patch)
tree3f1347670e845d752189b7ed981badddfca3f345 /libs/ardour/route.cc
parent0cf89e76ef37eb358b52a4006fde73217b820d52 (diff)
add back some amount of XML save/restore for route controls
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc30
1 files changed, 25 insertions, 5 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 7a3d37d2a7..0b8a0b8ff3 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2385,10 +2385,17 @@ Route::state(bool full_state)
snprintf (buf, sizeof (buf), "%d", _order_key);
node->add_property ("order-key", buf);
+ node->add_child_nocopy (_solo_control->get_state ());
+ node->add_child_nocopy (_solo_isolate_control->get_state ());
+ node->add_child_nocopy (_solo_safe_control->get_state ());
+
node->add_child_nocopy (_input->state (full_state));
node->add_child_nocopy (_output->state (full_state));
node->add_child_nocopy (_mute_master->get_state ());
+ node->add_child_nocopy (_mute_control->get_state ());
+ node->add_child_nocopy (_phase_control->get_state ());
+
if (full_state) {
node->add_child_nocopy (Automatable::get_automation_xml_state ());
}
@@ -2531,6 +2538,24 @@ Route::set_state (const XMLNode& node, int version)
warning << string_compose (_("Pannable state found for route (%1) without a panner!"), name()) << endmsg;
}
}
+
+ if (child->name() == Controllable::xml_node_name) {
+ if ((prop = child->property (X_("name"))) == 0) {
+ continue;
+ }
+
+ if (prop->value() == _gain_control->name()) {
+ _gain_control->set_state (*child, version);
+ } else if (prop->value() == _solo_control->name()) {
+ _solo_control->set_state (*child, version);
+ } else if (prop->value() == _solo_safe_control->name()) {
+ _solo_safe_control->set_state (*child, version);
+ } else if (prop->value() == _solo_isolate_control->name()) {
+ _solo_isolate_control->set_state (*child, version);
+ } else if (prop->value() == _solo_control->name()) {
+ _mute_control->set_state (*child, version);
+ }
+ }
}
if ((prop = node.property (X_("meter-point"))) != 0) {
@@ -2552,11 +2577,6 @@ Route::set_state (const XMLNode& node, int version)
// this looks up the internal instrument in processors
reset_instrument_info();
- _solo_control->set_state (node, version);
- _solo_safe_control->set_state (node, version);
- _solo_isolate_control->set_state (node, version);
- _mute_control->set_state (node, version);
-
if ((prop = node.property (X_("denormal-protection"))) != 0) {
set_denormal_protection (string_is_affirmative (prop->value()));
}