diff options
author | Robert Adam <dev@robert-adam.de> | 2022-01-21 21:02:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-21 21:02:23 +0300 |
commit | 27ad2debec19207584a637f6e632b9e1d783eab3 (patch) | |
tree | 24f2446508bec17b79f77743620abb8dabc463ac | |
parent | 28c3f6f2517093d5490d2cb208c763849fa51fdd (diff) | |
parent | 930aa1a532c0bc7a06f01a6343f3ccad8e58f1fb (diff) |
Merge PR #5479: BUILD: Fix -Wunused-function when compiling without rnnoise
The clampFloatSample function is only used when rnnoise support is enabled, when it isn't this the presence of the function (since it is static) causes a -Wunused-function warning which ultimately ends up causing a build error due to -Werror.
-rw-r--r-- | src/mumble/AudioInput.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mumble/AudioInput.cpp b/src/mumble/AudioInput.cpp index 1e42e24f8..c38d51289 100644 --- a/src/mumble/AudioInput.cpp +++ b/src/mumble/AudioInput.cpp @@ -32,11 +32,13 @@ extern "C" { #include <algorithm> #include <limits> +#ifdef USE_RNNOISE /// Clip the given float value to a range that can be safely converted into a short (without causing integer overflow) static short clampFloatSample(float v) { return static_cast< short >(std::min(std::max(v, static_cast< float >(std::numeric_limits< short >::min())), static_cast< float >(std::numeric_limits< short >::max()))); } +#endif void Resynchronizer::addMic(short *mic) { bool drop = false; |