summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc23
1 files changed, 20 insertions, 3 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 11f8ac2595..f3e7d90bbe 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -47,6 +47,7 @@
#include "ardour/internal_return.h"
#include "ardour/internal_send.h"
#include "ardour/meter.h"
+#include "ardour/delayline.h"
#include "ardour/midi_buffer.h"
#include "ardour/midi_port.h"
#include "ardour/monitor_processor.h"
@@ -142,6 +143,11 @@ Route::init ()
_output->changed.connect_same_thread (*this, boost::bind (&Route::output_change_handler, this, _1, _2));
_output->PortCountChanging.connect_same_thread (*this, boost::bind (&Route::output_port_count_changing, this, _1));
+ if (!is_master() && !is_monitor() && !is_auditioner()) {
+ _delayline.reset (new DelayLine (_session, _name));
+ add_processor (_delayline, PreFader);
+ }
+
/* add amp processor */
_amp.reset (new Amp (_session));
@@ -1431,7 +1437,7 @@ Route::clear_processors (Placement p)
seen_amp = true;
}
- if ((*i) == _amp || (*i) == _meter || (*i) == _main_outs) {
+ if ((*i) == _amp || (*i) == _meter || (*i) == _main_outs || (*i) == _delayline) {
/* you can't remove these */
@@ -1498,7 +1504,7 @@ Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStream
/* these can never be removed */
- if (processor == _amp || processor == _meter || processor == _main_outs) {
+ if (processor == _amp || processor == _meter || processor == _main_outs || processor == _delayline) {
return 0;
}
@@ -1615,7 +1621,7 @@ Route::remove_processors (const ProcessorList& to_be_deleted, ProcessorStreams*
/* these can never be removed */
- if (processor == _amp || processor == _meter || processor == _main_outs) {
+ if (processor == _amp || processor == _meter || processor == _main_outs || processor == _delayline) {
++i;
continue;
}
@@ -2580,6 +2586,9 @@ Route::set_processor_state (const XMLNode& node)
} else if (prop->value() == "meter") {
_meter->set_state (**niter, Stateful::current_state_version);
new_order.push_back (_meter);
+ } else if (prop->value() == "delay") {
+ _delayline->set_state (**niter, Stateful::current_state_version);
+ new_order.push_back (_delayline);
} else if (prop->value() == "main-outs") {
_main_outs->set_state (**niter, Stateful::current_state_version);
} else if (prop->value() == "intreturn") {
@@ -4101,6 +4110,10 @@ Route::setup_invisible_processors ()
}
}
+ if (!is_master() && !is_monitor() && !is_auditioner()) {
+ new_processors.push_front (_delayline);
+ }
+
/* MONITOR CONTROL */
if (_monitor_control && is_monitor ()) {
@@ -4257,6 +4270,10 @@ Route::non_realtime_locate (framepos_t pos)
_pannable->transport_located (pos);
}
+ if (_delayline.get()) {
+ _delayline.get()->flush();
+ }
+
{
//Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);