summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-06-11 16:46:44 +0200
committerRobin Gareus <robin@gareus.org>2014-06-11 17:14:26 +0200
commit4d0e564fa7e3c9a4828e55d49508107a67f77610 (patch)
treeb6b799c2319c34b74ba80e671a5d689f962290f4 /libs
parentca3c9cae6e36b3d7d0f0192fe6eb46d5e33dd2e9 (diff)
align internal sends using delaylines
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/route.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index f3e7d90bbe..0df06edcfc 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -512,6 +512,8 @@ Route::process_output_buffers (BufferSet& bufs,
/* set this to be true if the meter will already have been ::run() earlier */
bool const meter_already_run = metering_state() == MeteringInput;
+ framecnt_t latency = 0;
+
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
if (meter_already_run && boost::dynamic_pointer_cast<PeakMeter> (*i)) {
@@ -537,8 +539,16 @@ Route::process_output_buffers (BufferSet& bufs,
do we catch route != active somewhere higher?
*/
+ if (boost::dynamic_pointer_cast<Send>(*i) != 0) {
+ boost::dynamic_pointer_cast<Send>(*i)->set_delay_in(_signal_latency - latency);
+ }
+
(*i)->run (bufs, start_frame, end_frame, nframes, *i != _processors.back());
bufs.set_count ((*i)->output_streams());
+
+ if ((*i)->active ()) {
+ latency += (*i)->signal_latency ();
+ }
}
}