update route/processor semantics
[ardour.git] / libs / ardour / internal_return.cc
index fc5963603b5ac572d7d9313b3211b0b2c07bacc4..e42c067454823d7bc1341df08123f3c48e131424 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;
@@ -31,17 +32,17 @@ InternalReturn::InternalReturn (Session& s)
 }
 
 void
-InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t nframes, bool)
+InternalReturn::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, double /*speed*/, pframes_t nframes, bool)
 {
        if (!_active && !_pending_active) {
                return;
        }
 
        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);
                        }
                }