From fd3c7afe8fe8a4828cc4321fad74036cf60efbb6 Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 6 Sep 2023 12:51:35 +0200 Subject: [PATCH] removed short_int2float - not used - in documentation there was incorrectly stated that in and out can overlap; perhaps a C&P from int2float doc because it doesn' seem to be true - first written float overrides second read short so on --- src/audio/utils.cpp | 11 ----------- src/audio/utils.h | 7 ------- 2 files changed, 18 deletions(-) diff --git a/src/audio/utils.cpp b/src/audio/utils.cpp index eab46756c..aac02d744 100644 --- a/src/audio/utils.cpp +++ b/src/audio/utils.cpp @@ -496,17 +496,6 @@ void int2float(char *out, const char *in, int len) } } -void short_int2float(char *out, const char *in, int in_len) -{ - const auto *ini = reinterpret_cast(in); - float *outf = (float *)(void *) out; - int items = in_len / sizeof(int16_t); - - while(items-- > 0) { - *outf++ = (float) *ini++ / SHRT_MAX; - } -} - /** * Converts int8_t samples to uint8_t by adding 128 (standard * shifted zero unsigned samples). diff --git a/src/audio/utils.h b/src/audio/utils.h index 4e8915177..b1dcacffd 100644 --- a/src/audio/utils.h +++ b/src/audio/utils.h @@ -127,13 +127,6 @@ void float2int(char *out, const char *in, int len); * @param[in] in 4-byte aligned input buffer */ void int2float(char *out, const char *in, int len); -/** - * This fuction converts from int16_t to normalized float - * Input and output data may overlap. - * @param[out] out 4-byte aligned output buffer - * @param[in] in 4-byte aligned input buffer - */ -void short_int2float(char *out, const char *in, int in_len); void signed2unsigned(char *out, const char *in, int in_len);