Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2022-01-19 02:32:08 +0300
committerSören Tempel <soeren+git@soeren-tempel.net>2022-01-19 02:32:08 +0300
commit930aa1a532c0bc7a06f01a6343f3ccad8e58f1fb (patch)
tree9471c4d0b68179ea448607303d3cf4fae4ad7630
parenta517b06fb5a693e4cb3bc7704b657793ee638430 (diff)
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.cpp2
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;