]> 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:21:57 +0000 (10:21 -0500)
commita4d533d132c596e663df92806e8865439b34666c
treebb261d5143c24b8d11d04305abcaf89979a85ed1
parentfe0b5aed7beef3a703d6b6585cd2ab4ab2d5e760
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