Remove thought-to-be-unnecessary setup of Delivery::_no_outs_cuz_we_no_monitor
authorCarl Hetherington <carl@carlh.net>
Sat, 14 Jan 2012 23:31:55 +0000 (23:31 +0000)
committerCarl Hetherington <carl@carlh.net>
Sat, 14 Jan 2012 23:31:55 +0000 (23:31 +0000)
at the start of each cycle; it is set up at the start of Route::process_output_buffers.

git-svn-id: svn://localhost/ardour2/branches/3.0@11247 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/delivery.h
libs/ardour/ardour/internal_send.h
libs/ardour/audioengine.cc
libs/ardour/delivery.cc
libs/ardour/internal_send.cc

index 743854027deddb4f77db0c910c179ca16d9d6d13..89dff8850e23deaca11a68487aad407cbc348928 100644 (file)
@@ -74,7 +74,6 @@ public:
 
        void flush_buffers (framecnt_t nframes, framepos_t time);
        void no_outs_cuz_we_no_monitor(bool);
-       virtual void cycle_start (pframes_t);
        void transport_stopped (framepos_t frame);
        void realtime_locate ();
 
@@ -82,8 +81,6 @@ public:
 
        PBD::Signal0<void> MuteChange;
 
-       static PBD::Signal1<void, pframes_t> CycleStart;
-
        XMLNode& state (bool full);
        int set_state (const XMLNode&, int version);
 
index a185d07dfdc5fe6a6879b92745b2353aee39da09..8bfb0de8876d7c6de99e1b23f98538f91b4686cd 100644 (file)
@@ -56,6 +56,8 @@ class InternalSend : public Send
        void set_can_pan (bool yn);
        uint32_t pan_outs () const;
 
+       static PBD::Signal1<void, pframes_t> CycleStart;
+
   private:
        BufferSet mixbufs;
        boost::shared_ptr<Route> _send_to;
index 06a1637382ded9ede0c658a5571ad3e0fef8ecd9..215bb296a99d015b26f207896ca8c9e6e7bb0262 100644 (file)
@@ -43,9 +43,9 @@
 #include "ardour/buffer.h"
 #include "ardour/buffer_set.h"
 #include "ardour/cycle_timer.h"
-#include "ardour/delivery.h"
 #include "ardour/event_type_map.h"
 #include "ardour/internal_return.h"
+#include "ardour/internal_send.h"
 #include "ardour/io.h"
 #include "ardour/meter.h"
 #include "ardour/midi_port.h"
@@ -479,7 +479,7 @@ AudioEngine::process_callback (pframes_t nframes)
 
        /* tell all relevant objects that we're starting a new cycle */
 
-       Delivery::CycleStart (nframes);
+       InternalSend::CycleStart (nframes);
        Port::set_global_port_buffer_offset (0);
         Port::set_cycle_framecnt (nframes);
 
index c7ce380a48a34822e48429ed80453560324449cf..3b95c5ee3d521918e22e2cd424202ab19a071316 100644 (file)
@@ -47,7 +47,6 @@ using namespace std;
 using namespace PBD;
 using namespace ARDOUR;
 
-PBD::Signal1<void, pframes_t> Delivery::CycleStart;
 PBD::Signal0<int>             Delivery::PannersLegal;
 bool                          Delivery::panners_legal = false;
 
@@ -72,8 +71,6 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Pann
        if (_output) {
                _output->changed.connect_same_thread (*this, boost::bind (&Delivery::output_changed, this, _1, _2));
        }
-
-       CycleStart.connect_same_thread (*this, boost::bind (&Delivery::cycle_start, this, _1));
 }
 
 /* deliver to a new IO object */
@@ -96,8 +93,6 @@ Delivery::Delivery (Session& s, boost::shared_ptr<Pannable> pannable, boost::sha
        if (_output) {
                _output->changed.connect_same_thread (*this, boost::bind (&Delivery::output_changed, this, _1, _2));
        }
-
-       CycleStart.connect_same_thread (*this, boost::bind (&Delivery::cycle_start, this, _1));
 }
 
 
@@ -133,12 +128,6 @@ Delivery::display_name () const
        }
 }
 
-void
-Delivery::cycle_start (pframes_t /*nframes*/)
-{
-       _no_outs_cuz_we_no_monitor = false;
-}
-
 bool
 Delivery::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
 {
index 4ddd0647042ba433f1f3273105c2f0d02d5c5a30..cb9043fcee0bb28d72e401c064ab86b20a434bcb 100644 (file)
@@ -37,6 +37,8 @@ using namespace PBD;
 using namespace ARDOUR;
 using namespace std;
 
+PBD::Signal1<void, pframes_t> InternalSend::CycleStart;
+
 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)
 {
@@ -47,6 +49,8 @@ InternalSend::InternalSend (Session& s, boost::shared_ptr<Pannable> p, boost::sh
         }
 
        init_gain ();
+
+       CycleStart.connect_same_thread (*this, boost::bind (&InternalSend::cycle_start, this, _1));
 }
 
 InternalSend::~InternalSend ()
@@ -356,9 +360,7 @@ InternalSend::set_can_pan (bool yn)
 void
 InternalSend::cycle_start (pframes_t nframes)
 {
-       Delivery::cycle_start (nframes);
-
        for (BufferSet::audio_iterator b = mixbufs.audio_begin(); b != mixbufs.audio_end(); ++b) {
-               (*b).prepare ();
+               b->prepare ();
        }
 }