From 36ec03358fd3f124217416f3db67f9f1aba72aa9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 14 Jan 2012 23:31:55 +0000 Subject: [PATCH] Remove thought-to-be-unnecessary setup of Delivery::_no_outs_cuz_we_no_monitor 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 | 3 --- libs/ardour/ardour/internal_send.h | 2 ++ libs/ardour/audioengine.cc | 4 ++-- libs/ardour/delivery.cc | 11 ----------- libs/ardour/internal_send.cc | 8 +++++--- 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index 743854027d..89dff8850e 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -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 MuteChange; - static PBD::Signal1 CycleStart; - XMLNode& state (bool full); int set_state (const XMLNode&, int version); diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index a185d07dfd..8bfb0de887 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -56,6 +56,8 @@ class InternalSend : public Send void set_can_pan (bool yn); uint32_t pan_outs () const; + static PBD::Signal1 CycleStart; + private: BufferSet mixbufs; boost::shared_ptr _send_to; diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 06a1637382..215bb296a9 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -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); diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index c7ce380a48..3b95c5ee3d 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -47,7 +47,6 @@ using namespace std; using namespace PBD; using namespace ARDOUR; -PBD::Signal1 Delivery::CycleStart; PBD::Signal0 Delivery::PannersLegal; bool Delivery::panners_legal = false; @@ -72,8 +71,6 @@ Delivery::Delivery (Session& s, boost::shared_ptr io, boost::shared_ptrchanged.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, 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 { diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc index 4ddd064704..cb9043fcee 100644 --- a/libs/ardour/internal_send.cc +++ b/libs/ardour/internal_send.cc @@ -37,6 +37,8 @@ using namespace PBD; using namespace ARDOUR; using namespace std; +PBD::Signal1 InternalSend::CycleStart; + InternalSend::InternalSend (Session& s, boost::shared_ptr p, boost::shared_ptr mm, boost::shared_ptr sendto, Delivery::Role role) : Send (s, p, mm, role) { @@ -47,6 +49,8 @@ InternalSend::InternalSend (Session& s, boost::shared_ptr 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 (); } } -- 2.30.2