summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-29 04:17:16 +0200
committerRobin Gareus <robin@gareus.org>2017-09-29 05:03:48 +0200
commit2b20f30d81c3371e58c69c3bbc836767ff7e81d1 (patch)
tree14af85db5849147f7ad5eb8a7747b52611b6e176 /libs/ardour/route.cc
parent9f9e948d845382c8f74e67034fd8beb1704bba78 (diff)
Aux-Send Latency compensation, part 2 & code-consolidation
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 6d1544fe41..85ed7a1fd8 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -4045,11 +4045,18 @@ Route::add_export_point()
samplecnt_t
Route::update_signal_latency (bool apply_to_delayline)
{
+ // TODO: bail out if !active() and set/assume _signal_latency = 0,
+ // here or in Session::* ? -> also zero send latencies,
+ // and make sure that re-enabling a route updates things again...
+
Glib::Threads::RWLock::ReaderLock lm (_processor_lock);
- samplecnt_t l_in = 0; // _input->latency ();
+ samplecnt_t l_in = 0;
samplecnt_t l_out = _output->user_latency();
for (ProcessorList::reverse_iterator i = _processors.rbegin(); i != _processors.rend(); ++i) {
+ if (boost::shared_ptr<Send> snd = boost::dynamic_pointer_cast<Send> (*i)) {
+ snd->set_delay_in (l_out + _output->latency());
+ }
(*i)->set_output_latency (l_out);
if ((*i)->active ()) {
l_out += (*i)->signal_latency ();
@@ -4069,7 +4076,6 @@ Route::update_signal_latency (bool apply_to_delayline)
(*i)->set_capture_offset (_input->latency ());
}
-
lm.release ();
if (apply_to_delayline) {