This is an automated email from the ASF dual-hosted git repository.

kopyscinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit 61021c15754056d44d0485e8da01262bb1bd1c02
Author: Krzysztof Kopyściński <[email protected]>
AuthorDate: Fri Mar 15 08:27:44 2024 +0100

    ext/libsamplerate: compile using single precision floating point numbers
    
    Compile using floats instead of doubles, so the FPUs that don't support
    double-precision arithmetic can be used.
---
 ext/libsamplerate/pkg.yml      | 5 ++++-
 ext/libsamplerate/src/config.h | 4 ----
 ext/libsamplerate/syscfg.yml   | 3 ---
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/ext/libsamplerate/pkg.yml b/ext/libsamplerate/pkg.yml
index 4bb808902..94a950261 100644
--- a/ext/libsamplerate/pkg.yml
+++ b/ext/libsamplerate/pkg.yml
@@ -26,9 +26,12 @@ pkg.keywords:
 
 pkg.type: sdk
 
-pkg.cflags: -DHAVE_STDBOOL_H -fsingle-precision-constant -DHAVE_CONFIG_H 
-DNDEBUG
+pkg.cflags: -O3 -DHAVE_STDBOOL_H -fsingle-precision-constant -DHAVE_CONFIG_H 
-DNDEBUG -DLIBSAMPLERATE_SINGLE_PRECISION
 pkg.lflags: -lm
 
+app.cflags:
+    - -DLIBSAMPLERATE_SINGLE_PRECISION
+
 pkg.src_dirs:
     - "@libsamplerate/src"
 
diff --git a/ext/libsamplerate/src/config.h b/ext/libsamplerate/src/config.h
index 9c77c58e4..dca00b2b8 100644
--- a/ext/libsamplerate/src/config.h
+++ b/ext/libsamplerate/src/config.h
@@ -34,10 +34,6 @@
 #define ENABLE_SINC_FAST_CONVERTER      1
 #endif
 
-#if MYNEWT_VAL(LIBSAMPLERATE_LIBSAMPLER_NDEBUG)
-#define LIBSAMPLER_NDEBUG      1
-#endif
-
 #define PACKAGE     "libsamplerate"
 #define VERSION     "0.2.2"
 
diff --git a/ext/libsamplerate/syscfg.yml b/ext/libsamplerate/syscfg.yml
index 285820045..730d84d1d 100644
--- a/ext/libsamplerate/syscfg.yml
+++ b/ext/libsamplerate/syscfg.yml
@@ -25,6 +25,3 @@ syscfg.defs:
     LIBSAMPLERATE_ENABLE_SINC_FAST_CONVERTER:
         description: Enable SINC fastest converter
         value: 1
-    LIBSAMPLERATE_LIBSAMPLER_NDEBUG:
-        description: Define NDEBUG for resampler code (turns off asserts)
-        value: 0

Reply via email to