From e6bbcd415d20a4c3ca699c251cb26f4a38ea8b9d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 19 Feb 2021 13:56:47 +0100 Subject: [PATCH] Remove unused methods (to query public latency) --- libs/ardour/ardour/io.h | 1 - libs/ardour/io.cc | 2 ++ libs/ardour/port.cc | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h index c4fabba5e7..1bec0066e2 100644 --- a/libs/ardour/ardour/io.h +++ b/libs/ardour/ardour/io.h @@ -120,7 +120,6 @@ public: bool physically_connected () const; samplecnt_t latency () const; - samplecnt_t public_latency () const; samplecnt_t connected_latency (bool for_playback) const; void set_private_port_latencies (samplecnt_t value, bool playback); diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 14465479f8..5af985b50e 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -1289,6 +1289,7 @@ IO::latency () const return max_latency; } +#if 0 // not used, but may some day be handy for debugging samplecnt_t IO::public_latency () const { @@ -1312,6 +1313,7 @@ IO::public_latency () const ((_direction == Output) ? "PLAYBACK" : "CAPTURE"))); return max_latency; } +#endif samplecnt_t IO::connected_latency (bool for_playback) const diff --git a/libs/ardour/port.cc b/libs/ardour/port.cc index 72256090ff..69b49d117e 100644 --- a/libs/ardour/port.cc +++ b/libs/ardour/port.cc @@ -433,9 +433,9 @@ Port::private_latency_range (bool playback) const LatencyRange Port::public_latency_range (bool /*playback*/) const { + /*Note: this method is no longer used. It exists purely for debugging reasons */ LatencyRange r; - if (_port_handle) { r = port_engine.get_latency_range (_port_handle, sends_output() ? true : false); if (externally_connected () && 0 == (_flags & TransportSyncPort)) { @@ -443,10 +443,13 @@ Port::public_latency_range (bool /*playback*/) const r.min /= _speed_ratio; r.max /= _speed_ratio; #endif +#if 0 + /* use value as set by set_public_latency_range */ if (type () == DataType::AUDIO) { r.min += (_resampler_quality - 1); r.max += (_resampler_quality - 1); } +#endif } DEBUG_TRACE (DEBUG::LatencyIO, string_compose (