summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-06-23 00:48:47 +0200
committerRobin Gareus <robin@gareus.org>2014-06-23 00:48:47 +0200
commitf6aaa1660bbce1782b8292d106c8adfb1ecbdc16 (patch)
treefed19ed4b309e256d5d9980b81f0d5725b32cbf2
parent14c6dfab075b20c19396516ea9f6f663cb2d1def (diff)
en/disable internal send+returns with tracks en/disable.
-rw-r--r--gtk2_ardour/processor_box.cc4
-rw-r--r--libs/ardour/ardour/internal_send.h4
-rw-r--r--libs/ardour/internal_return.cc3
-rw-r--r--libs/ardour/internal_send.cc19
-rw-r--r--libs/ardour/route.cc6
5 files changed, 23 insertions, 13 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index aa8f285a43..56d2d371eb 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -2111,8 +2111,8 @@ ProcessorBox::paste_processor_state (const XMLNodeList& nlist, boost::shared_ptr
boost::shared_ptr<Pannable> sendpan(new Pannable (*_session));
XMLNode n (**niter);
- InternalSend* s = new InternalSend (*_session, sendpan, _route->mute_master(),
- boost::shared_ptr<Route>(), Delivery::Aux);
+ InternalSend* s = new InternalSend (*_session, sendpan, _route->mute_master(),
+ _route, boost::shared_ptr<Route>(), Delivery::Aux);
IOProcessor::prepare_for_reset (n, s->name());
diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h
index a06bf39906..6feeb35c6d 100644
--- a/libs/ardour/ardour/internal_send.h
+++ b/libs/ardour/ardour/internal_send.h
@@ -28,7 +28,7 @@ namespace ARDOUR {
class LIBARDOUR_API InternalSend : public Send
{
public:
- InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_to, Delivery::Role role = Delivery::Aux, bool ignore_bitslot = false);
+ InternalSend (Session&, boost::shared_ptr<Pannable>, boost::shared_ptr<MuteMaster>, boost::shared_ptr<Route> send_from, boost::shared_ptr<Route> send_to, Delivery::Role role = Delivery::Aux, bool ignore_bitslot = false);
virtual ~InternalSend ();
std::string display_name() const;
@@ -46,6 +46,7 @@ class LIBARDOUR_API InternalSend : public Send
bool configure_io (ChanCount in, ChanCount out);
int set_block_size (pframes_t);
+ boost::shared_ptr<Route> source_route() const { return _send_from; }
boost::shared_ptr<Route> target_route() const { return _send_to; }
const PBD::ID& target_id() const { return _send_to_id; }
@@ -60,6 +61,7 @@ class LIBARDOUR_API InternalSend : public Send
private:
BufferSet mixbufs;
+ boost::shared_ptr<Route> _send_from;
boost::shared_ptr<Route> _send_to;
PBD::ID _send_to_id;
PBD::ScopedConnection connect_c;
diff --git a/libs/ardour/internal_return.cc b/libs/ardour/internal_return.cc
index fc5963603b..1eae5d3171 100644
--- a/libs/ardour/internal_return.cc
+++ b/libs/ardour/internal_return.cc
@@ -20,6 +20,7 @@
#include "ardour/internal_return.h"
#include "ardour/internal_send.h"
+#include "ardour/route.h"
using namespace std;
using namespace ARDOUR;
@@ -41,7 +42,7 @@ InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*e
if (lm.locked ()) {
for (list<InternalSend*>::iterator i = _sends.begin(); i != _sends.end(); ++i) {
- if ((*i)->active ()) {
+ if ((*i)->active () && (!(*i)->source_route() || (*i)->source_route()->active())) {
bufs.merge_from ((*i)->get_buffers(), nframes);
}
}
diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc
index 23d9221086..e5c7232f48 100644
--- a/libs/ardour/internal_send.cc
+++ b/libs/ardour/internal_send.cc
@@ -40,14 +40,21 @@ using namespace std;
PBD::Signal1<void, pframes_t> InternalSend::CycleStart;
-InternalSend::InternalSend (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role, bool ignore_bitslot)
+InternalSend::InternalSend (Session& s,
+ boost::shared_ptr<Pannable> p,
+ boost::shared_ptr<MuteMaster> mm,
+ boost::shared_ptr<Route> sendfrom,
+ boost::shared_ptr<Route> sendto,
+ Delivery::Role role,
+ bool ignore_bitslot)
: Send (s, p, mm, role, ignore_bitslot)
+ , _send_from (sendfrom)
{
- if (sendto) {
- if (use_target (sendto)) {
- throw failed_constructor();
- }
- }
+ if (sendto) {
+ if (use_target (sendto)) {
+ throw failed_constructor();
+ }
+ }
init_gain ();
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index b50492031f..6a23ca70d4 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2643,7 +2643,7 @@ Route::set_processor_state (const XMLNode& node)
if (prop->value() == "intsend") {
- processor.reset (new InternalSend (_session, _pannable, _mute_master, boost::shared_ptr<Route>(), Delivery::Aux, true));
+ processor.reset (new InternalSend (_session, _pannable, _mute_master, boost::shared_ptr<ARDOUR::Route>(this), boost::shared_ptr<Route>(), Delivery::Aux, true));
} else if (prop->value() == "ladspa" || prop->value() == "Ladspa" ||
prop->value() == "lv2" ||
@@ -2812,7 +2812,7 @@ Route::enable_monitor_send ()
/* make sure we have one */
if (!_monitor_send) {
- _monitor_send.reset (new InternalSend (_session, _pannable, _mute_master, _session.monitor_out(), Delivery::Listen));
+ _monitor_send.reset (new InternalSend (_session, _pannable, _mute_master, boost::shared_ptr<ARDOUR::Route>(this), _session.monitor_out(), Delivery::Listen));
_monitor_send->set_display_to_user (false);
}
@@ -2850,7 +2850,7 @@ Route::add_aux_send (boost::shared_ptr<Route> route, boost::shared_ptr<Processor
{
Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
boost::shared_ptr<Pannable> sendpan (new Pannable (_session));
- listener.reset (new InternalSend (_session, sendpan, _mute_master, route, Delivery::Aux));
+ listener.reset (new InternalSend (_session, sendpan, _mute_master, boost::shared_ptr<ARDOUR::Route>(this), route, Delivery::Aux));
}
add_processor (listener, before);