From 326f9b721d74834b654fcc295b8ef2e773e763d2 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Wed, 15 Jun 2022 17:22:32 +0100 Subject: [PATCH] Add RTENTRY macro for STOAT testing --- src/common/sysutils.h | 6 ++++++ src/finer/R3StretcherImpl.cpp | 8 +++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/common/sysutils.h b/src/common/sysutils.h index 06755ec..e0532f3 100644 --- a/src/common/sysutils.h +++ b/src/common/sysutils.h @@ -45,6 +45,12 @@ # define R__ #endif +#ifdef __clang__ +# define RTENTRY__ __attribute__((annotate("realtime"))) +#else +# define RTENTRY__ +#endif + #if defined(_MSC_VER) # include # include diff --git a/src/finer/R3StretcherImpl.cpp b/src/finer/R3StretcherImpl.cpp index 5f9ffeb..e471372 100644 --- a/src/finer/R3StretcherImpl.cpp +++ b/src/finer/R3StretcherImpl.cpp @@ -384,12 +384,10 @@ R3StretcherImpl::getSamplesRequired() const } } -//!!! __attribute__((annotate("realtime"))) +RTENTRY__ void R3StretcherImpl::process(const float *const *input, size_t samples, bool final) { - //!!! todo: final - if (m_mode == ProcessMode::Finished) { m_parameters.logger("R3StretcherImpl::process: Cannot process again after final chunk"); return; @@ -432,7 +430,7 @@ R3StretcherImpl::process(const float *const *input, size_t samples, bool final) consume(); } -//!!! __attribute__((annotate("realtime"))) +RTENTRY__ int R3StretcherImpl::available() const { @@ -444,7 +442,7 @@ R3StretcherImpl::available() const } } -//!!! __attribute__((annotate("realtime"))) +RTENTRY__ size_t R3StretcherImpl::retrieve(float *const *output, size_t samples) const {