[asterisk-commits] file: branch file/bridging-softmixgen2 r180791 - /team/file/bridging-softmixg...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 9 21:41:02 CDT 2009
Author: file
Date: Mon Mar 9 21:40:59 2009
New Revision: 180791
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=180791
Log:
Don't include our own audio in the mixed frame.
Modified:
team/file/bridging-softmixgen2/bridges/bridge_softmix.c
Modified: team/file/bridging-softmixgen2/bridges/bridge_softmix.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging-softmixgen2/bridges/bridge_softmix.c?view=diff&rev=180791&r1=180790&r2=180791
==============================================================================
--- team/file/bridging-softmixgen2/bridges/bridge_softmix.c (original)
+++ team/file/bridging-softmixgen2/bridges/bridge_softmix.c Mon Mar 9 21:40:59 2009
@@ -308,8 +308,20 @@
struct softmix_channel *softmix_channel = bridge_channel->bridge_pvt;
if (softmix_channel->audio) {
+ short buf[SOFTMIX_SAMPLES], *our_buf = buf, *segment_buf = softmix_channel->segment->buf;
+
+ for (i = 0; i < softmix_channel->segment->frame.samples; i++, our_buf++, segment_buf++) {
+ *our_buf = *segment_buf;
+ ast_slinear_saturated_subtract(our_buf, segment_buf);
+ }
+
+ softmix_channel->segment->frame.data.ptr = buf;
+
ast_write(bridge_channel->chan, &softmix_channel->segment->frame);
+
+ softmix_channel->segment->frame.data.ptr = softmix_channel->segment->buf;
} else {
+ ast_write(bridge_channel->chan, &softmix_channel->segment->frame);
}
softmix_channel->audio = 0;
More information about the asterisk-commits
mailing list