diff options
author | David Robillard <d@drobilla.net> | 2007-01-09 23:24:54 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-01-09 23:24:54 +0000 |
commit | 532f6aad4ac79ca15d69deccd18fca90e444c437 (patch) | |
tree | 0d4ca5449af8eb48ad56e163efcab42c4656e8de /libs/ardour/send.cc | |
parent | ef6b25432d9c46d71b08c0f7d5f2686df428c4e8 (diff) |
Merged with trunk R1283.
NOTE: Compiles, but broken (crash on adding MIDI track).
git-svn-id: svn://localhost/ardour2/branches/midi@1292 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/send.cc')
-rw-r--r-- | libs/ardour/send.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index 73dbf11ad5..0141007803 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -34,7 +34,7 @@ using namespace ARDOUR; using namespace PBD; Send::Send (Session& s, Placement p) - : Redirect (s, s.next_send_name(), p) + : Redirect (s, string_compose (_("send %1"), (bitslot = s.next_send_id()) + 1), p) { _metering = false; RedirectCreated (this); /* EMIT SIGNAL */ @@ -53,7 +53,7 @@ Send::Send (Session& s, const XMLNode& node) } Send::Send (const Send& other) - : Redirect (other._session, other._session.next_send_name(), other.placement()) + : Redirect (other._session, string_compose (_("send %1"), (bitslot = other._session.next_send_id()) + 1), other.placement()) { _metering = false; RedirectCreated (this); /* EMIT SIGNAL */ @@ -74,7 +74,10 @@ XMLNode& Send::state(bool full) { XMLNode *node = new XMLNode("Send"); + char buf[32]; node->add_child_nocopy (Redirect::state (full)); + snprintf (buf, sizeof (buf), "%" PRIu32, bitslot); + node->add_property ("bitslot", buf); return *node; } @@ -83,6 +86,14 @@ Send::set_state(const XMLNode& node) { XMLNodeList nlist = node.children(); XMLNodeIterator niter; + const XMLProperty* prop; + + if ((prop = node.property ("bitslot")) == 0) { + bitslot = _session.next_send_id(); + } else { + sscanf (prop->value().c_str(), "%" PRIu32, &bitslot); + _session.mark_send_id (bitslot); + } /* Send has regular IO automation (gain, pan) */ |