diff options
author | Robin Gareus <robin@gareus.org> | 2019-11-08 17:49:37 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-11-08 17:50:26 +0100 |
commit | bd90499532d7e4410649e4c4153b5092c1c721f3 (patch) | |
tree | dfc6f2c0d14e5683b954f03242509b4e1a582b92 /libs/ardour/route.cc | |
parent | 41ad43fa5f95e142bd9ad855fc262b1f60977e83 (diff) |
Ignore latency of inactive routes
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r-- | libs/ardour/route.cc | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 749f4a1e7d..018035d4d3 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -4140,9 +4140,20 @@ 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... + if (!active()) { + _signal_latency = 0; + /* mark all send are inactive, set internal-return "delay-out" to zero. */ + for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { + if (boost::shared_ptr<LatentSend> snd = boost::dynamic_pointer_cast<LatentSend> (*i)) { + snd->set_delay_in (0); + } + if (boost::shared_ptr<InternalReturn> rtn = boost::dynamic_pointer_cast<InternalReturn> (*i)) { + rtn->set_playback_offset (0); + } + // TODO sidechain inputs?! + } + return 0; + } samplecnt_t capt_lat_in = _input->connected_latency (false); samplecnt_t play_lat_out = _output->connected_latency (true); @@ -4474,6 +4485,9 @@ Route::set_active (bool yn, void* src) _input->set_active (yn); _output->set_active (yn); flush_processors (); + if (_active || _signal_latency > 0) { + processor_latency_changed (); /* EMIT SIGNAL */ + } active_changed (); // EMIT SIGNAL _session.set_dirty (); } |