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.
diff --git a/ext/libsamplerate/pkg.yml b/ext/libsamplerate/pkg.yml
index 4bb8089..94a9502 100644
--- a/ext/libsamplerate/pkg.yml
+++ b/ext/libsamplerate/pkg.yml
@@ -26,9 +26,12 @@
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 9c77c58..dca00b2 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 2858200..730d84d 100644
--- a/ext/libsamplerate/syscfg.yml
+++ b/ext/libsamplerate/syscfg.yml
@@ -25,6 +25,3 @@
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