Stop saving of garbage values to LADSPA preset files when an output parameter is...
[ardour.git] / libs / ardour / internal_send.cc
index 36621717404cd62c720fb776f1f3e91706e6448f..4c3b385304e88c54f6c871c677d90f787937850c 100644 (file)
@@ -32,8 +32,9 @@ using namespace PBD;
 using namespace ARDOUR;
 using namespace std;
 
-InternalSend::InternalSend (Session& s, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role)
-       : Send (s, mm, role)
+InternalSend::InternalSend (Session& s, boost::shared_ptr<Pannable> p, boost::shared_ptr<MuteMaster> mm, boost::shared_ptr<Route> sendto, Delivery::Role role)
+       : Send (s, p, 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, pframes_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
-InternalSend::set_block_size (nframes_t nframes)
+int
+InternalSend::set_block_size (pframes_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