interpolation.cc/.h: Spline-Bugfixes: Crash bug at tempos close to 0, wrong calculati...
[ardour.git] / libs / ardour / internal_return.cc
index f3ab1dd901a4bf63091e62c6cee38834ee993f22..807582c37956748edf89dc05fa5a2460042d1da7 100644 (file)
@@ -44,9 +44,13 @@ InternalReturn::InternalReturn (Session& s, const XMLNode& node)
 }
 
 void
-InternalReturn::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
+InternalReturn::run (BufferSet& bufs, sframes_t /*start_frame*/, sframes_t /*end_frame*/, nframes_t nframes)
 {
-       /* XXX no lock here, just atomic fetch */
+       if (!_active && !_pending_active) {
+               return;
+       }
+
+       /* no lock here, just atomic fetch */
 
        if (g_atomic_int_get(&user_count) == 0) {
                /* nothing to do - nobody is feeding us anything */
@@ -54,6 +58,7 @@ InternalReturn::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame
        }
 
        bufs.merge_from (buffers, nframes);
+       _active = _pending_active;
 }
 
 bool
@@ -138,5 +143,8 @@ InternalReturn::can_support_io_configuration (const ChanCount& in, ChanCount& ou
        return true;
 }
 
-
-
+bool
+InternalReturn::visible () const
+{
+       return false; 
+}