summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-23 04:56:45 +0200
committerRobin Gareus <robin@gareus.org>2020-04-23 04:56:45 +0200
commit40eefeddd666ee9a83c07382a28836e5b4aef6cd (patch)
treebbd390a3bafe667a2c3b04c5a79ce6e1cf6a5444 /libs/ardour/ardour
parent6b10987e4bd9961b6603b426eae087ee49e1bca5 (diff)
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.
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/route.h3
1 files changed, 3 insertions, 0 deletions
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<void> active_changed;
PBD::Signal0<void> denormal_protection_changed;
PBD::Signal0<void> 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;