persist remote_control_id for busses

git-svn-id: svn://localhost/ardour2/trunk@1470 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
John Anderson
2007-02-17 07:16:57 +00:00
parent 2571f8e4c1
commit 78f6e01f2d
2 changed files with 13 additions and 13 deletions

View File

@@ -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

View File

@@ -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) {