summaryrefslogtreecommitdiff
path: root/lib/opusfile
diff options
context:
space:
mode:
authorailurux <ailuruxx@gmail.com>2024-02-16 17:02:54 +1100
committerailurux <ailuruxx@gmail.com>2024-02-16 17:02:54 +1100
commit19f60e33c4ba7eda86c709a8d73ca5e8ab100952 (patch)
tree3181edfa09dc38c5cd52a07bcd3f64dfe05a4439 /lib/opusfile
parent0baad11b188e7bac6b968017716186d9da0e492f (diff)
parent4509ab8d6e341f7f7d92ac6e9d63ad822fe3441b (diff)
downloadtangara-fw-19f60e33c4ba7eda86c709a8d73ca5e8ab100952.tar.gz
Merge branch 'main' into seek-support
Diffstat (limited to 'lib/opusfile')
-rw-r--r--lib/opusfile/CMakeLists.txt6
-rw-r--r--lib/opusfile/include/custom_support.h10
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/opusfile/CMakeLists.txt b/lib/opusfile/CMakeLists.txt
index f9b5e4ce..fe958b67 100644
--- a/lib/opusfile/CMakeLists.txt
+++ b/lib/opusfile/CMakeLists.txt
@@ -11,6 +11,11 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(OPUS_FIXED_POINT ON)
set(OPUS_ENABLE_FLOAT_API OFF)
+
+set(OPUS_VAR_ARRAYS OFF)
+set(OPUS_USE_ALLOCA ON)
+set(OPUS_NONTHREADSAFE_PSEUDOSTACK OFF)
+
set(OPUS_INSTALL_PKG_CONFIG_MODULE OFF)
set(OPUS_INSTALL_CMAKE_CONFIG_MODULE OFF)
set(OPUS_BUILD_TESTING OFF)
@@ -18,5 +23,6 @@ set(OPUS_BUILD_SHARED_LIBS OFF)
add_subdirectory($ENV{PROJ_PATH}/lib/opus ${CMAKE_CURRENT_BINARY_DIR}/opus)
target_compile_definitions(opus PRIVATE CUSTOM_SUPPORT)
+target_compile_options(opus PRIVATE -Os -DSMALL_FOOTPRINT -funroll-loops -ffast-math)
target_include_directories(opus PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(${COMPONENT_LIB} PUBLIC opus)
diff --git a/lib/opusfile/include/custom_support.h b/lib/opusfile/include/custom_support.h
index d99cc5e2..60cab623 100644
--- a/lib/opusfile/include/custom_support.h
+++ b/lib/opusfile/include/custom_support.h
@@ -6,12 +6,10 @@
#define OVERRIDE_OPUS_ALLOC
#define OVERRIDE_OPUS_FREE
-static OPUS_INLINE void *opus_alloc (size_t size)
-{
- return heap_caps_malloc(size, MALLOC_CAP_8BIT | MALLOC_CAP_INTERNAL);
+static OPUS_INLINE void* opus_alloc(size_t size) {
+ return heap_caps_malloc(size, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
}
-static OPUS_INLINE void opus_free (void *ptr)
-{
- heap_caps_free(ptr);
+static OPUS_INLINE void opus_free(void* ptr) {
+ heap_caps_free(ptr);
}