summaryrefslogtreecommitdiff
path: root/codecs/speex/arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'codecs/speex/arch.h')
-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