From e7c0e5bd1e83aa29176333f69fbdb247560a7632 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 2 Oct 2015 15:47:52 -0700 Subject: Add another speex cast. Change-Id: Ic46823788fa240ebadd44ec2c6d332980af597be Reviewed-on: https://code.wireshark.org/review/10755 Reviewed-by: Gerald Combs --- codecs/speex/arch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'codecs') 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 -- cgit v1.2.3