mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-10 23:46:20 +01:00
Use XMLNode::get/set_property in ARDOUR::Send class
This commit is contained in:
parent
03559d43b9
commit
8ea1431fc2
1 changed files with 6 additions and 10 deletions
|
|
@ -216,16 +216,14 @@ XMLNode&
|
|||
Send::state (bool full)
|
||||
{
|
||||
XMLNode& node = Delivery::state(full);
|
||||
char buf[32];
|
||||
|
||||
node.add_property ("type", "send");
|
||||
snprintf (buf, sizeof (buf), "%" PRIu32, _bitslot);
|
||||
node.set_property ("type", "send");
|
||||
|
||||
if (_role != Listen) {
|
||||
node.add_property ("bitslot", buf);
|
||||
node.set_property ("bitslot", _bitslot);
|
||||
}
|
||||
|
||||
node.add_property("selfdestruct", _remove_on_disconnect ? "yes" : "no");
|
||||
node.set_property ("selfdestruct", _remove_on_disconnect);
|
||||
|
||||
node.add_child_nocopy (_amp->state (full));
|
||||
|
||||
|
|
@ -261,11 +259,11 @@ Send::set_state (const XMLNode& node, int version)
|
|||
} else {
|
||||
if (_role == Delivery::Aux) {
|
||||
_session.unmark_aux_send_id (_bitslot);
|
||||
sscanf (prop->value().c_str(), "%" PRIu32, &_bitslot);
|
||||
_bitslot = string_to<uint32_t>(prop->value());
|
||||
_session.mark_aux_send_id (_bitslot);
|
||||
} else if (_role == Delivery::Send) {
|
||||
_session.unmark_send_id (_bitslot);
|
||||
sscanf (prop->value().c_str(), "%" PRIu32, &_bitslot);
|
||||
_bitslot = string_to<uint32_t>(prop->value());
|
||||
_session.mark_send_id (_bitslot);
|
||||
} else {
|
||||
// bitslot doesn't matter but make it zero anyway
|
||||
|
|
@ -274,9 +272,7 @@ Send::set_state (const XMLNode& node, int version)
|
|||
}
|
||||
}
|
||||
|
||||
if ((prop = node.property (X_("selfdestruct"))) != 0) {
|
||||
_remove_on_disconnect = string_is_affirmative (prop->value());
|
||||
}
|
||||
node.get_property (X_("selfdestruct"), _remove_on_disconnect);
|
||||
|
||||
XMLNodeList nlist = node.children();
|
||||
for (XMLNodeIterator i = nlist.begin(); i != nlist.end(); ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue