From 40eefeddd666ee9a83c07382a28836e5b4aef6cd Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 23 Apr 2020 04:56:45 +0200 Subject: Micro optimization: cache output IO latency IO::latency iterates over the port-set retrieving the private_latency_range of each port. Since it can only change when connections and latency changes, we can instead cache the value. This is also in preparation to allow the auditioner to override it. --- libs/ardour/ardour/route.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/ardour/ardour') diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 08f9465803..ef102a9b48 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -355,6 +355,8 @@ public: samplecnt_t signal_latency() const { return _signal_latency; } samplecnt_t playback_latency (bool incl_downstream = false) const; + virtual samplecnt_t output_latency () const { return _output_latency; } + PBD::Signal0 active_changed; PBD::Signal0 denormal_protection_changed; PBD::Signal0 comment_changed; @@ -615,6 +617,7 @@ protected: bool _active; samplecnt_t _signal_latency; + samplecnt_t _output_latency; ProcessorList _processors; mutable Glib::Threads::RWLock _processor_lock; -- cgit v1.2.3