use ForGroup to flag and detect route-group based control changes
[ardour.git] / libs / ardour / internal_return.cc
index af6b6110b632b4c4d38d06349ce509b96932e284..4947231c84717b9836a405c7d5dfc09eaa7aa6f3 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "ardour/internal_return.h"
 #include "ardour/internal_send.h"
+#include "ardour/route.h"
 
 using namespace std;
 using namespace ARDOUR;
@@ -38,10 +39,10 @@ InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*e
        }
 
        Glib::Threads::Mutex::Lock lm (_sends_mutex, Glib::Threads::TRY_LOCK);
-       
+
        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);
                        }
                }
@@ -80,7 +81,7 @@ InternalReturn::get_state()
 }
 
 bool
-InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
+InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& out)
 {
        out = in;
        return true;