LADSPA logarithmic handling patches from nickm and robsch
[ardour.git] / libs / ardour / port_insert.cc
index 8ff26337715fb0a43f84b509c17e538260c03563..a46f7a7da3ea5188721e6c5225fbbff8dc9dc95b 100644 (file)
@@ -66,20 +66,23 @@ PortInsert::~PortInsert ()
 }
 
 void
-PortInsert::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
+PortInsert::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes)
 {
        if (_output->n_ports().n_total() == 0) {
                return;
        }
 
-       if (!active()) {
+       if (!_active && !_pending_active) {
                /* deliver silence */
                silence (nframes);
-               return;
+               goto out;
        }
 
-       _out->run_in_place (bufs, start_frame, end_frame, nframes);
+       _out->run (bufs, start_frame, end_frame, nframes);
        _input->collect_input (bufs, nframes, ChanCount::ZERO);
+
+  out:
+       _active = _pending_active;
 }
 
 XMLNode&