summaryrefslogtreecommitdiff
path: root/libs/ardour/send.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-07 17:31:18 +0000
committerDavid Robillard <d@drobilla.net>2009-05-07 17:31:18 +0000
commit2c231282baa596219506c1ee4632708977cc0714 (patch)
treeb5dd7dedd8b5c9b7740b444711d26cdeb114687a /libs/ardour/send.cc
parent80c8866303c405fb6230eb96f2a8cd7f181b57da (diff)
Returns (i.e. sidechains).
And lo, upon the revision of our hoarde 5061, was the last Big Feature committed to Three Poino, who, now more than ever, lurks imposingly on the sidelines, heir to the throne, and eventual ruler of the realm. His eventual succession all but guaranteed, only time and the number of heads that must roll remain mysteries. git-svn-id: svn://localhost/ardour2/branches/3.0@5061 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/send.cc')
-rw-r--r--libs/ardour/send.cc65
1 files changed, 16 insertions, 49 deletions
diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc
index 9246db9458..2c28fb5dcd 100644
--- a/libs/ardour/send.cc
+++ b/libs/ardour/send.cc
@@ -36,7 +36,7 @@ using namespace ARDOUR;
using namespace PBD;
Send::Send (Session& s)
- : IOProcessor (s, string_compose (_("send %1"), (bitslot = s.next_send_id()) + 1))
+ : IOProcessor (s, string_compose (_("send %1"), (_bitslot = s.next_send_id()) + 1))
{
_metering = false;
ProcessorCreated (this); /* EMIT SIGNAL */
@@ -71,7 +71,7 @@ Send::state(bool full)
XMLNode& node = IOProcessor::state(full);
char buf[32];
node.add_property ("type", "send");
- snprintf (buf, sizeof (buf), "%" PRIu32, bitslot);
+ snprintf (buf, sizeof (buf), "%" PRIu32, _bitslot);
node.add_property ("bitslot", buf);
return node;
@@ -85,10 +85,10 @@ Send::set_state(const XMLNode& node)
const XMLProperty* prop;
if ((prop = node.property ("bitslot")) == 0) {
- bitslot = _session.next_send_id();
+ _bitslot = _session.next_send_id();
} else {
- sscanf (prop->value().c_str(), "%" PRIu32, &bitslot);
- _session.mark_send_id (bitslot);
+ sscanf (prop->value().c_str(), "%" PRIu32, &_bitslot);
+ _session.mark_send_id (_bitslot);
}
const XMLNode* insert_node = &node;
@@ -113,15 +113,7 @@ Send::run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame,
{
if (active()) {
- // we have to copy the input, because IO::deliver_output may alter the buffers
- // in-place, which a send must never do.
-
- BufferSet& sendbufs = _session.get_mix_buffers(bufs.count());
-
- sendbufs.read_from(bufs, nframes);
- assert(sendbufs.count() == bufs.count());
-
- _io->deliver_output (sendbufs, start_frame, end_frame, nframes);
+ _io->deliver_output (bufs, start_frame, end_frame, nframes);
if (_metering) {
if (_io->effective_gain() == 0) {
@@ -152,26 +144,27 @@ Send::set_metering (bool yn)
}
bool
-Send::can_support_io_configuration (const ChanCount& in, ChanCount& out_is_ignored) const
+Send::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
{
- if (_io->input_maximum() == ChanCount::INFINITE && _io->output_maximum() == ChanCount::INFINITE) {
+ if (_io->input_maximum() == ChanCount::INFINITE
+ && _io->output_maximum() == ChanCount::INFINITE) {
- /* not configured yet */
+ /* not configured yet, we can support anything */
- return 1; /* we can support anything the first time we're asked */
+ out = in;
+ return true; /* we can support anything the first time we're asked */
} else {
- /* the "input" config for a port insert corresponds to how
- many output ports it will have.
- */
+ /* for a send, processor input corresponds to IO output */
if (_io->output_maximum() == in) {
- return 1;
+ out = in;
+ return true;
}
}
- return -1;
+ return false;
}
bool
@@ -198,32 +191,6 @@ Send::configure_io (ChanCount in, ChanCount out)
return true;
}
-ChanCount
-Send::output_streams() const
-{
- // this method reflects the idea that from the perspective of the Route's ProcessorList,
- // a send is just a passthrough. that doesn't match what the Send actually does with its
- // data, but since what it does is invisible to the Route, it appears to be a passthrough.
-
- return _configured_input;
-}
-
-ChanCount
-Send::input_streams() const
-{
- return _configured_input;
-}
-
-
-void
-Send::expect_inputs (const ChanCount& expected)
-{
- if (expected != expected_inputs) {
- expected_inputs = expected;
- _io->reset_panner ();
- }
-}
-
/** Set up the XML description of a send so that its name is unique.
* @param state XML send state.
* @param session Session.