]> git.ipfire.org Git - thirdparty/asterisk.git/commit
func_talkdetect.c: Fix logical errors in silence detection.
authorSean Bright <sean.bright@gmail.com>
Thu, 14 Oct 2021 19:38:33 +0000 (15:38 -0400)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 19 Oct 2021 15:25:00 +0000 (10:25 -0500)
commit093fabba84271d85d8aa3e4d0aa3bdfb47e95b6f
treeca784f1abf2a7b218dd4aaa527f46df4891790a4
parent702484431d2bc7a36e7dc75f24a7190fa0cfbadc
func_talkdetect.c: Fix logical errors in silence detection.

There are 3 separate changes here:

1. The documentation erroneously stated that the dsp_talking_threshold
   argument was a number of milliseconds when it is actually an energy
   level used by the DSP code to classify talking vs. silence.

2. Fixes a copy paste error in the argument handling code.

3. Don't erroneously switch to the talking state if we aren't actively
   handling a frame we've classified as talking.

Patch inspired by one provided by Moritz Fain (License #6961).

ASTERISK-27816 #close

Change-Id: I5953fd570b98b49c41cee55bfe3b941753fb2511
funcs/func_talkdetect.c