summaryrefslogtreecommitdiff
path: root/libs/ardour/send.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-04-01 01:24:13 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-04-01 01:24:13 +0000
commitc0c617902e03db2a75e8733dcc9982a575c2366a (patch)
tree6c415257fa82d2af9fad773565b36d95c076469e /libs/ardour/send.cc
parent50dd880d7e75b49e7c80c79f32165a756839651c (diff)
revisit setting up processors during route construction; remove several more XML-based constructors; don't put () parens around inactive plugin names (we have a checkbox); improve management of send, return and insert bitslot IDs; clean up Diskstream construction a bit more
git-svn-id: svn://localhost/ardour2/branches/3.0@6819 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/send.cc')
-rw-r--r--libs/ardour/send.cc42
1 files changed, 16 insertions, 26 deletions
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc
index c664d67617..14d7981d20 100644
--- a/libs/ardour/send.cc
+++ b/libs/ardour/send.cc
@@ -44,26 +44,11 @@ Send::Send (Session& s, boost::shared_ptr<MuteMaster> mm, Role r)
{
_amp.reset (new Amp (_session, _mute_master));
_meter.reset (new PeakMeter (_session));
-
- ProcessorCreated (this); /* EMIT SIGNAL */
-}
-
-Send::Send (Session& s, boost::shared_ptr<MuteMaster> mm, const XMLNode& node, int version, Role r)
- : Delivery (s, mm, "send", r)
- , _metering (false)
-{
- _amp.reset (new Amp (_session, _mute_master));
- _meter.reset (new PeakMeter (_session));
-
- if (set_state (node, version)) {
- throw failed_constructor();
- }
-
- ProcessorCreated (this); /* EMIT SIGNAL */
}
Send::~Send ()
{
+ _session.unmark_send_id (_bitslot);
}
void
@@ -139,7 +124,7 @@ Send::get_state(void)
}
XMLNode&
-Send::state(bool full)
+Send::state (bool full)
{
XMLNode& node = Delivery::state(full);
char buf[32];
@@ -158,18 +143,23 @@ Send::set_state (const XMLNode& node, int version)
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);
- }
+ Delivery::set_state (node, version);
- const XMLNode* insert_node = &node;
+ /* don't try to reset bitslot if its already set: this can cause
+ issues with the session's accounting of send ID's
+ */
- /* XXX need to load automation state & data for amp */
+ if ((prop = node.property ("bitslot")) == 0) {
+ _bitslot = _session.next_send_id();
+ } else {
+ _session.unmark_send_id (_bitslot);
+ sscanf (prop->value().c_str(), "%" PRIu32, &_bitslot);
+ _session.mark_send_id (_bitslot);
+ }
+
+ set_name (string_compose (_("send %1"), _bitslot));
- Delivery::set_state (*insert_node, version);
+ /* XXX need to load automation state & data for amp */
return 0;
}