From 5a2ea4d0e2b9afb23da25e43e1f6b7a3cbe4df11 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 28 Sep 2017 15:45:12 +0200 Subject: [PATCH] Delayline naming -- for debug purposes --- libs/ardour/ardour/delayline.h | 2 ++ libs/ardour/ardour/send.h | 2 +- libs/ardour/delayline.cc | 8 +++++++- libs/ardour/internal_send.cc | 1 + libs/ardour/route.cc | 9 ++++++++- libs/ardour/send.cc | 5 ++++- 6 files changed, 23 insertions(+), 4 deletions(-) diff --git a/libs/ardour/ardour/delayline.h b/libs/ardour/ardour/delayline.h index b760bd94f1..eeeb2beea7 100644 --- a/libs/ardour/ardour/delayline.h +++ b/libs/ardour/ardour/delayline.h @@ -54,6 +54,8 @@ public: void realtime_locate () { flush(); } void monitoring_changed() { flush(); } + bool set_name (const std::string& str); + XMLNode& state (bool full); private: diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 4594d38847..6db3e61540 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -26,13 +26,13 @@ #include "ardour/ardour.h" #include "ardour/delivery.h" -#include "ardour/delayline.h" namespace ARDOUR { class PeakMeter; class Amp; class GainControl; +class DelayLine; class LIBARDOUR_API Send : public Delivery { diff --git a/libs/ardour/delayline.cc b/libs/ardour/delayline.cc index 689fd58c81..d92eec6a0a 100644 --- a/libs/ardour/delayline.cc +++ b/libs/ardour/delayline.cc @@ -33,7 +33,7 @@ using namespace PBD; using namespace ARDOUR; DelayLine::DelayLine (Session& s, const std::string& name) - : Processor (s, string_compose ("latency-compensation-%1-%2", name, this)) + : Processor (s, string_compose ("latcomp-%1-%2", name, this)) , _delay(0) , _pending_delay(0) , _bsiz(0) @@ -48,6 +48,12 @@ DelayLine::~DelayLine () { } +bool +DelayLine::set_name (const string& name) +{ + return Processor::set_name (string_compose ("latcomp-%1-%2", name, this)); +} + #define FADE_LEN (16) void DelayLine::run (BufferSet& bufs, samplepos_t /* start_sample */, samplepos_t /* end_sample */, double /* speed */, pframes_t nsamples, bool) diff --git a/libs/ardour/internal_send.cc b/libs/ardour/internal_send.cc index 8255d3dceb..10ad17a406 100644 --- a/libs/ardour/internal_send.cc +++ b/libs/ardour/internal_send.cc @@ -23,6 +23,7 @@ #include "ardour/amp.h" #include "ardour/audio_buffer.h" +#include "ardour/delayline.h" #include "ardour/internal_return.h" #include "ardour/internal_send.h" #include "ardour/meter.h" diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index ee4068dda1..2d24ac4ac6 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -193,7 +193,7 @@ Route::init () } if (!is_master() && !is_monitor() && !is_auditioner()) { - _delayline.reset (new DelayLine (_session, name () + ":in")); + _delayline.reset (new DelayLine (_session, name ())); } /* and input trim */ @@ -2472,6 +2472,9 @@ Route::state(bool full_state) { Glib::Threads::RWLock::ReaderLock lm (_processor_lock); for (i = _processors.begin(); i != _processors.end(); ++i) { + if (*i == _delayline) { + continue; + } if (!full_state) { /* template save: do not include internal sends functioning as aux sends because the chance of the target ID @@ -2688,6 +2691,10 @@ Route::set_state (const XMLNode& node, int version) } } + if (_delayline) { + _delayline->set_name (name ()); + } + return 0; } diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index ca5c49585f..28f4286f70 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -26,6 +26,7 @@ #include "ardour/boost_debug.h" #include "ardour/buffer_set.h" #include "ardour/debug.h" +#include "ardour/delayline.h" #include "ardour/gain_control.h" #include "ardour/io.h" #include "ardour/meter.h" @@ -95,7 +96,7 @@ Send::Send (Session& s, boost::shared_ptr p, boost::shared_ptrChanged.connect_same_thread (*this, boost::bind (&Send::panshell_changed, this)); @@ -281,6 +282,8 @@ Send::set_state (const XMLNode& node, int version) } } + _delayline->set_name ("Send-" + name()); + return 0; }