diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp index 800766d02..aa4aa7338 100644 --- a/src/AudioIO.cpp +++ b/src/AudioIO.cpp @@ -565,15 +565,6 @@ struct AudioIO::ScrubQueue dd.Cancel(); } } - ~ScrubQueue() {} - - double LastTimeInQueue() const - { - // Needed by the main thread sometimes - wxMutexLocker locker(mUpdating); - const Entry &previous = mEntries[(mLeadingIdx + Size - 1) % Size]; - return previous.mS1.as_double() / mRate; - } // This is for avoiding deadlocks while starting a scrub: // Audio stream needs to be unblocked @@ -735,6 +726,16 @@ struct AudioIO::ScrubQueue mLastTransformerTimeMillis = now; } + double LastTimeInQueue() const + { + // Needed by the main thread sometimes + wxMutexLocker locker(mUpdating); + const Entry &previous = mEntries[(mLeadingIdx + Size - 1) % Size]; + return previous.mS1.as_double() / mRate; + } + + ~ScrubQueue() {} + private: struct Entry {