summaryrefslogtreecommitdiff
path: root/session_utils
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2016-08-30 14:01:52 +1000
committerTim Mayberry <mojofunk@gmail.com>2017-04-19 09:36:57 +1000
commit0c7581312974af9479d6b2fbebd7aa342f76a51f (patch)
tree933f9b009f92669fb66fc6f707b4a0e1a31343b6 /session_utils
parenta6d71df0d06c8efcf1ee306a5fbc70a4ddceb12f (diff)
Use XMLNode::set_property API in copy-mixer Session utility
Diffstat (limited to 'session_utils')
-rw-r--r--session_utils/copy-mixer.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/session_utils/copy-mixer.cc b/session_utils/copy-mixer.cc
index d317af6548..2fa3c1fb14 100644
--- a/session_utils/copy-mixer.cc
+++ b/session_utils/copy-mixer.cc
@@ -39,37 +39,35 @@ trim_state_for_mixer_copy (Session*s, XMLNode& node)
*/
XMLProperty const * target = (*i)->property (X_("name"));
if (!target) {
- (*i)->add_property ("type", "dangling-aux-send");
+ (*i)->set_property ("type", "dangling-aux-send");
continue;
}
boost::shared_ptr<Route> r = s->route_by_name (target->value ());
if (!r || boost::dynamic_pointer_cast<Track> (r)) {
- (*i)->add_property ("type", "dangling-aux-send");
+ (*i)->set_property ("type", "dangling-aux-send");
continue;
}
- (*i)->add_property ("target", r->id ().to_s ());
+ (*i)->set_property ("target", r->id ().to_s ());
}
if (role && role->value () == X_("Listen")) {
(*i)->remove_property (X_("bitslot"));
}
else if (role && (role->value () == X_("Send") || role->value () == X_("Aux"))) {
- char buf[32];
Delivery::Role xrole;
uint32_t bitslot = 0;
xrole = Delivery::Role (string_2_enum (role->value (), xrole));
std::string name = Send::name_and_id_new_send (*s, xrole, bitslot, false);
- snprintf (buf, sizeof (buf), "%" PRIu32, bitslot);
(*i)->remove_property (X_("bitslot"));
(*i)->remove_property (X_("name"));
- (*i)->add_property ("bitslot", buf);
- (*i)->add_property ("name", name);
+ (*i)->set_property ("bitslot", bitslot);
+ (*i)->set_property ("name", name);
}
else if (type && type->value () == X_("intreturn")) {
// ignore, in case bus existed in old session,
// tracks in old session may be connected to it.
// if the bus is new, new_route_from_template()
// will have re-created an ID.
- (*i)->add_property ("type", "ignore-aux-return");
+ (*i)->set_property ("type", "ignore-aux-return");
}
else if (type && type->value () == X_("return")) {
// Return::set_state() generates a new one
@@ -78,7 +76,7 @@ trim_state_for_mixer_copy (Session*s, XMLNode& node)
else if (type && type->value () == X_("port")) {
// PortInsert::set_state() handles the bitslot
(*i)->remove_property (X_("bitslot"));
- (*i)->add_property ("ignore-name", "1");
+ (*i)->set_property ("ignore-name", "1");
}
}
}