update internal-send port-count when target port-count changes
authorRobin Gareus <robin@gareus.org>
Mon, 13 Jan 2014 09:48:23 +0000 (10:48 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jan 2014 14:39:50 +0000 (09:39 -0500)
libs/ardour/ardour/internal_send.h
libs/ardour/delivery.cc
libs/ardour/internal_send.cc

index 8636a805db5cc661f8965ce4b08dbb5a753cbf35..9bfbc4c659e150df8a2d1dc34ba06ab0f10faf9e 100644 (file)
@@ -70,6 +70,7 @@ class LIBARDOUR_API InternalSend : public Send
        int  connect_when_legal ();
        void init_gain ();
        int  use_target (boost::shared_ptr<Route>);
+       void target_io_changed ();
 };
 
 } // namespace ARDOUR
index 79c44ce94a0efa8bd6d9e7b80ea62fe33c9f9212..575d26acdddc8f9852c40a6bb712318a6413ac29 100644 (file)
@@ -388,7 +388,7 @@ Delivery::reset_panner ()
                        if (_panshell) {
                                _panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, pan_outs()));
                                
-                               if (_role == Main) {
+                               if (_role == Main || _role == Aux) {
                                        _panshell->pannable()->set_panner (_panshell->panner());
                                }
                        }
index 9716cf002c6e884dc8ff463d9d01ab04befee01d..dac1839a5ea07a89bfc2a0907a75be81281c800e 100644 (file)
@@ -95,11 +95,21 @@ InternalSend::use_target (boost::shared_ptr<Route> sendto)
         target_connections.drop_connections ();
 
         _send_to->DropReferences.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_going_away, this));
-        _send_to->PropertyChanged.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_property_changed, this, _1));;
+        _send_to->PropertyChanged.connect_same_thread (target_connections, boost::bind (&InternalSend::send_to_property_changed, this, _1));
+        _send_to->io_changed.connect_same_thread (target_connections, boost::bind (&InternalSend::target_io_changed, this));
 
         return 0;
 }
 
+void
+InternalSend::target_io_changed ()
+{
+       assert (_send_to);
+       mixbufs.ensure_buffers (_send_to->internal_return()->input_streams(), _session.get_block_size());
+       mixbufs.set_count (_send_to->internal_return()->input_streams());
+       reset_panner();
+}
+
 void
 InternalSend::send_to_going_away ()
 {