[asterisk-commits] file: branch file/bridging r81327 - in /team/file/bridging: ./ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 28 21:24:22 CDT 2007


Author: file
Date: Tue Aug 28 21:24:21 2007
New Revision: 81327

URL: http://svn.digium.com/view/asterisk?view=rev&rev=81327
Log:
Merged revisions 81326 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r81326 | file | 2007-08-28 23:21:08 -0300 (Tue, 28 Aug 2007) | 2 lines

Add inline function for signed linear subtraction.

........

Modified:
    team/file/bridging/   (props changed)
    team/file/bridging/include/asterisk/utils.h

Propchange: team/file/bridging/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug 28 21:24:21 2007
@@ -1,1 +1,1 @@
-/trunk:1-81296
+/trunk:1-81326

Modified: team/file/bridging/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/team/file/bridging/include/asterisk/utils.h?view=diff&rev=81327&r1=81326&r2=81327
==============================================================================
--- team/file/bridging/include/asterisk/utils.h (original)
+++ team/file/bridging/include/asterisk/utils.h Tue Aug 28 21:24:21 2007
@@ -276,6 +276,19 @@
 	int res;
 
 	res = (int) *input + *value;
+	if (res > 32767)
+		*input = 32767;
+	else if (res < -32767)
+		*input = -32767;
+	else
+		*input = (short) res;
+}
+
+static force_inline void ast_slinear_saturated_subtract(short *input, short *value)
+{
+	int res;
+
+	res = (int) *input - *value;
 	if (res > 32767)
 		*input = 32767;
 	else if (res < -32767)




More information about the asterisk-commits mailing list