From bc89fe0147c04b67141936d109c00dfd4d69cc4b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 12 Dec 2008 14:43:24 +0000 Subject: most of the 2.X->3.0 commit (up to rev 4299) except for gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet git-svn-id: svn://localhost/ardour2/branches/3.0@4313 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/send.cc | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'libs/ardour/send.cc') diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index 034bed77c3..58352a5dfe 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -27,6 +27,8 @@ #include #include #include +#include + #include "i18n.h" using namespace ARDOUR; @@ -55,6 +57,41 @@ Send::Send (const Send& other) : IOProcessor (other._session, string_compose (_("send %1"), (bitslot = other._session.next_send_id()) + 1), other.placement()) { _metering = false; + + expected_inputs.set (DataType::AUDIO, 0); + +#ifdef THIS_NEEDS_FIXING_FOR_V3 + + /* set up the same outputs, and connect them to the same places */ + + _io->no_panner_reset = true; + + for (uint32_t i = 0; i < other.n_outputs (); ++i) { + add_output_port ("", 0); + Port* p = other.output (i); + if (p) { + /* this is what the other send's output is connected to */ + const char **connections = p->get_connections (); + if (connections) { + for (uint32_t c = 0; connections[c]; ++c) { + connect_output (output (i), connections [c], 0); + } + } + } + } + + /* setup panner */ + + _io->no_panner_reset = false; + + /* copy state */ + + XMLNode& other_state (const_cast(&other)->_panner->get_state()); + _panner->set_state (other_state); + + delete &other_state; +#endif + ProcessorCreated (this); /* EMIT SIGNAL */ } -- cgit v1.2.3