From 1b343a1fec0c90a670dc90bb7059e71955f8d3e1 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 31 Aug 2024 23:42:33 +0200 Subject: [PATCH] Revert "Reduce locate overhead for optimized builds" This reverts commit 960d72012dca728f55d9936f22a57e78b6296886. --- libs/ardour/session_transport.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index 7167182bf9..1937dbdca5 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -1276,6 +1276,7 @@ Session::non_realtime_locate () /* no more looping .. should have been noticed elsewhere */ } + microseconds_t start; uint32_t nt = 0; samplepos_t tf; @@ -1287,9 +1288,7 @@ Session::non_realtime_locate () restart: sc = _seek_counter.load (); tf = _transport_sample; -#ifndef NDEBUG - microseconds_t start = get_microseconds (); -#endif + start = get_microseconds (); std::shared_ptr tl = io_tasklist (); for (auto const& i : *rl) { @@ -1301,9 +1300,9 @@ Session::non_realtime_locate () goto restart; } -#ifndef NDEBUG microseconds_t end = get_microseconds (); int usecs_per_track = lrintf ((end - start) / std::max (1.0, nt)); +#ifndef NDEBUG std::cerr << "locate to " << tf << " took " << (end - start) << " usecs for " << nt << " tracks = " << usecs_per_track << " per track\n"; #endif if (usecs_per_track > _current_usecs_per_track.load ()) {