summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorJohn Anderson <ardour@semiosix.com>2007-02-17 07:16:57 +0000
committerJohn Anderson <ardour@semiosix.com>2007-02-17 07:16:57 +0000
commit78f6e01f2dcc810d8479ec43728139c69c5c7c0b (patch)
tree6f8b32a046ce8b17eed43017c1c2d80c3f2b2f7d /libs
parent2571f8e4c1a8c5ed3992839c7fb25e0be9e3e239 (diff)
persist remote_control_id for busses
git-svn-id: svn://localhost/ardour2/trunk@1470 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/audio_track.cc14
-rw-r--r--libs/ardour/route.cc12
2 files changed, 13 insertions, 13 deletions
diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc
index e7b1368fa4..476cad329a 100644
--- a/libs/ardour/audio_track.cc
+++ b/libs/ardour/audio_track.cc
@@ -276,14 +276,7 @@ AudioTrack::_set_state (const XMLNode& node, bool call_base)
for (niter = nlist.begin(); niter != nlist.end(); ++niter){
child = *niter;
- if (child->name() == X_("remote_control")) {
- if ((prop = child->property (X_("id"))) != 0) {
- int32_t x;
- sscanf (prop->value().c_str(), "%d", &x);
- set_remote_control_id (x);
- }
-
- } else if (child->name() == X_("recenable")) {
+ if (child->name() == X_("recenable")) {
_rec_enable_control.set_state (*child);
_session.add_controllable (&_rec_enable_control);
}
@@ -329,11 +322,6 @@ AudioTrack::state(bool full_state)
align_node->add_property (X_("style"), enum_2_string (as));
root.add_child_nocopy (*align_node);
- XMLNode* remote_control_node = new XMLNode (X_("remote_control"));
- snprintf (buf, sizeof (buf), "%d", _remote_control_id);
- remote_control_node->add_property (X_("id"), buf);
- root.add_child_nocopy (*remote_control_node);
-
root.add_property (X_("mode"), enum_2_string (_mode));
/* we don't return diskstream state because we don't
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 6915b32792..a6462dd5c3 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -1421,6 +1421,11 @@ Route::state(bool full_state)
node->add_child_nocopy (_solo_control.get_state ());
node->add_child_nocopy (_mute_control.get_state ());
+ XMLNode* remote_control_node = new XMLNode (X_("remote_control"));
+ snprintf (buf, sizeof (buf), "%d", _remote_control_id);
+ remote_control_node->add_property (X_("id"), buf);
+ node->add_child_nocopy (*remote_control_node);
+
if (_control_outs) {
XMLNode* cnode = new XMLNode (X_("ControlOuts"));
cnode->add_child_nocopy (_control_outs->state (full_state));
@@ -1714,6 +1719,13 @@ Route::_set_state (const XMLNode& node, bool call_base)
_session.add_controllable (&_mute_control);
}
}
+ else if (child->name() == X_("remote_control")) {
+ if ((prop = child->property (X_("id"))) != 0) {
+ int32_t x;
+ sscanf (prop->value().c_str(), "%d", &x);
+ set_remote_control_id (x);
+ }
+ }
}
if ((prop = node.property (X_("mix-group"))) != 0) {