Skip to content

Commit

Permalink
ext/libsamplerate: compile using single precision floating point numbers
Browse files Browse the repository at this point in the history
Compile using floats instead of doubles, so the FPUs that don't support
double-precision arithmetic can be used.
  • Loading branch information
KKopyscinski committed Apr 15, 2024
1 parent 2c1b130 commit 61021c1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 4 additions & 1 deletion ext/libsamplerate/pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 0 additions & 4 deletions ext/libsamplerate/src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
3 changes: 0 additions & 3 deletions ext/libsamplerate/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 61021c1

Please sign in to comment.