From 4a48a0c09f342507876f377077499d556264b872 Mon Sep 17 00:00:00 2001 From: AlexandreRouma Date: Fri, 12 Dec 2025 01:53:37 -0500 Subject: [PATCH] fix support for versions of volk prior to 2.3 --- decoder_modules/atv_decoder/src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/decoder_modules/atv_decoder/src/main.cpp b/decoder_modules/atv_decoder/src/main.cpp index 1bab4412..ee99d1fd 100644 --- a/decoder_modules/atv_decoder/src/main.cpp +++ b/decoder_modules/atv_decoder/src/main.cpp @@ -129,7 +129,14 @@ class ATVDecoderModule : public ModuleManager::Instance { ATVDecoderModule *_this = (ATVDecoderModule *)ctx; // Correct the offset +#if VOLK_VERSION_MAJOR > 2 || (VOLK_VERSION_MAJOR == 2 && VOLK_VERSION_MINOR >= 3) volk_32f_s32f_add_32f(data, data, _this->offset, count); +#else + const float ofs = _this->offset; + for (int i = 0; i < count; i++) { + data[i] += ofs; + } +#endif // Correct the gain volk_32f_s32f_multiply_32f(data, data, _this->gain, count);