Delayline naming -- for debug purposes

This commit is contained in:
Robin Gareus 2017-09-28 15:45:12 +02:00
parent 24ec0b974d
commit 5a2ea4d0e2
6 changed files with 23 additions and 4 deletions

View File

@ -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:

View File

@ -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
{

View File

@ -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)

View File

@ -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"

View File

@ -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;
}

View File

@ -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<Pannable> p, boost::shared_ptr<MuteMas
_amp.reset (new Amp (_session, _("Fader"), _gain_control, true));
_meter.reset (new PeakMeter (_session, name()));
_delayline.reset (new DelayLine (_session, name()));
_delayline.reset (new DelayLine (_session, "Send-" + name()));
if (panner_shell()) {
panner_shell()->Changed.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;
}