diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-29 13:03:23 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-10-29 13:03:23 +0000 |
commit | 8c43d1ec0596d3adb4f69009a0e3aeae8a716707 (patch) | |
tree | 1d9487e6e5fb5a4cb9be67fc85a8a48a1b5b3096 /include | |
parent | e7ab16d2442daa76a3c60282894fb36a42877a12 (diff) |
do saturated math properly (thanks to the eagle-eyes of Tony Mountifield)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6888 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-x | include/asterisk/utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h index 9aa1a34c3..2f603a77a 100755 --- a/include/asterisk/utils.h +++ b/include/asterisk/utils.h @@ -173,7 +173,7 @@ static inline void ast_slinear_saturated_add(short *input, short value) { int res; - res = *input + value; + res = (int) *input + value; if (res > 32767) *input = 32767; else if (res < -32767) @@ -186,7 +186,7 @@ static inline void ast_slinear_saturated_multiply(short *input, short value) { int res; - res = *input * value; + res = (int) *input * value; if (res > 32767) *input = 32767; else if (res < -32767) |