<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14418">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">bridge_softmix: Always remove audio from mixed frame.<br><br>When receiving audio from a channel we determine if it<br>is talking or silence based on a threshold value. If<br>this threshold is met we always mix the audio into the<br>conference bridge. If this threshold is not met we also<br>mix the audio into the conference bridge UNLESS the<br>drop silence option is enabled.<br><br>The code that removed the audio from the mixed frame<br>assumed that it was always not present if it did not<br>meet the threshold to be considered talking. This is<br>incorrect. If it has been stated that the audio was<br>mixed into the mixed frame then it has been mixed into<br>the mixed frame. By not removing audio that was<br>considered non-talking it was possible for a channel<br>to receive a slight echo of audio of itself at times.<br><br>This change ensures that the audio is always removed<br>from the mixed frame going back to the channel so it<br>no longer receives the slight echo.<br><br>ASTERISK-28898<br><br>Change-Id: I7b1b582cc1bcdb318ecc60c9d2e3d87ae31d55cb<br>---<br>M bridges/bridge_softmix.c<br>1 file changed, 3 insertions(+), 4 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c</span><br><span>index 09218ce..36d82a5 100644</span><br><span>--- a/bridges/bridge_softmix.c</span><br><span>+++ b/bridges/bridge_softmix.c</span><br><span>@@ -207,9 +207,8 @@</span><br><span> struct softmix_translate_helper_entry *entry = NULL;</span><br><span> int i;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- /* If we provided audio that was not determined to be silence,</span><br><span style="color: hsl(0, 100%, 40%);">- * then take it out while in slinear format. */</span><br><span style="color: hsl(0, 100%, 40%);">- if (sc->have_audio && sc->talking && !sc->binaural) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* If we provided any audio then take it out while in slinear format. */</span><br><span style="color: hsl(120, 100%, 40%);">+ if (sc->have_audio && !sc->binaural) {</span><br><span> for (i = 0; i < sc->write_frame.samples; i++) {</span><br><span> ast_slinear_saturated_subtract(&sc->final_buf[i], &sc->our_buf[i]);</span><br><span> }</span><br><span>@@ -224,7 +223,7 @@</span><br><span> /* do not do any special write translate optimization if we had to make</span><br><span> * a special mix for them to remove their own audio. */</span><br><span> return;</span><br><span style="color: hsl(0, 100%, 40%);">- } else if (sc->have_audio && sc->talking && sc->binaural > 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (sc->have_audio && sc->binaural > 0) {</span><br><span> /*</span><br><span> * Binaural audio requires special saturated substract since we have two</span><br><span> * audio signals per channel now.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14418">change 14418</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14418"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I7b1b582cc1bcdb318ecc60c9d2e3d87ae31d55cb </div>
<div style="display:none"> Gerrit-Change-Number: 14418 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>