From 035d5b40255b6c58f2ae701ad0fc597ff8fff580 Mon Sep 17 00:00:00 2001 From: myself Date: Sun, 29 Dec 2024 11:49:58 +0000 Subject: [PATCH 1/2] make it build on linux --- CMakeLists.txt | 2 ++ src/log.h | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb4609f..5a7c11c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,6 +80,8 @@ add_library( # Provides a relative path to your source file(s). ${FILES}) +if (ANDROID) target_link_libraries(v4a_re log) # kissfft) +endif() target_compile_options(v4a_re PRIVATE -flto -O3 -DNDEBUG) #target_compile_options(v4afx_r PRIVATE -O2 -DNDEBUG -Wall -Wsign-conversion -Wno-unused-result -Wno-unneeded-internal-declaration -fstrict-aliasing -fvisibility=hidden -Wextra -Wno-unused-parameter) diff --git a/src/log.h b/src/log.h index 294fb50..3f2b68e 100644 --- a/src/log.h +++ b/src/log.h @@ -1,9 +1,21 @@ #pragma once +#ifdef __ANDROID__ + #include #define TAG "ViPER4Android" #define VIPER_LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) #define VIPER_LOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__) -#define VIPER_LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) \ No newline at end of file +#define VIPER_LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) + +#else + +#include + +#define VIPER_LOGD(...) fprintf(stderr, __VA_ARGS__) +#define VIPER_LOGI(...) fprintf(stderr, __VA_ARGS__) +#define VIPER_LOGE(...) fprintf(stderr, __VA_ARGS__) + +#endif From ad409c7e57b73cd33d25cabfde76cdab1da7fb42 Mon Sep 17 00:00:00 2001 From: myself Date: Sun, 29 Dec 2024 15:50:01 +0000 Subject: [PATCH 2/2] expose effect directly --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a7c11c..1c30524 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ add_compile_definitions(VIPER_VERSION=20240314) #add_subdirectory(src/viper/ffts) # ViPERFX -include_directories(src/include) +include_directories(src/include src/viper/effects src/viper/utils) set(FILES # Main