Don't add standard processors twice to routes from 2.X sessions. Fixes #3434.
[ardour.git] / libs / ardour / internal_send.cc
index 36621717404cd62c720fb776f1f3e91706e6448f..8ec543030870a76c09a37892572e7ebe0af8519e 100644 (file)
@@ -34,6 +34,7 @@ using namespace std;
 
 InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role)
        : Send (s, mm, role)
+       , target (0)
 {
         if (sendto) {
                 if (use_target (sendto)) {
@@ -80,7 +81,7 @@ InternalSend::send_to_going_away ()
 }
 
 void
-InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes, bool)
+InternalSend::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool)
 {
        if ((!_active && !_pending_active) || !target || !_send_to) {
                _meter->reset ();
@@ -145,10 +146,16 @@ InternalSend::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame,
        _active = _pending_active;
 }
 
-void
+int
 InternalSend::set_block_size (nframes_t nframes)
 {
        mixbufs.ensure_buffers (_configured_input, nframes);
+
+       /* ensure that our target can cope with us merging this many frames to it */
+       if (target) {
+               target->ensure_buffers (_configured_input, nframes);
+       }
+        return 0;
 }
 
 bool