aboutsummaryrefslogtreecommitdiffstats
path: root/codecs
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-10-02 15:47:52 -0700
committerGerald Combs <gerald@wireshark.org>2015-10-02 22:50:49 +0000
commite7c0e5bd1e83aa29176333f69fbdb247560a7632 (patch)
tree9a3f8c98f89409ac4bfbcaa62b06e40a54bae620 /codecs
parent8d3b97cc9054bcc4c3db0e0262d12a26cd0e9d82 (diff)
Add another speex cast.
Change-Id: Ic46823788fa240ebadd44ec2c6d332980af597be Reviewed-on: https://code.wireshark.org/review/10755 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'codecs')
-rw-r--r--codecs/speex/arch.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/codecs/speex/arch.h b/codecs/speex/arch.h
index 225315d66b..e160663ee1 100644
--- a/codecs/speex/arch.h
+++ b/codecs/speex/arch.h
@@ -101,7 +101,7 @@ typedef spx_word32_t spx_sig_t;
#define SIG_SHIFT 14
#define GAIN_SHIFT 6
-#define WORD2INT(x) ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x)))
+#define WORD2INT(x) ((spx_int16_t)((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x))))
#define VERY_SMALL 0
#define VERY_LARGE32 ((spx_word32_t)2147483647)
@@ -205,7 +205,7 @@ typedef float spx_word32_t;
#define DIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
#define PDIV32(a,b) (((spx_word32_t)(a))/(spx_word32_t)(b))
-#define WORD2INT(x) ((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : floor(.5+(x))))
+#define WORD2INT(x) ((spx_int16_t)((x) < -32767.5f ? -32768 : ((x) > 32766.5f ? 32767 : floor(.5+(x)))))
#endif