[asterisk-commits] jrose: trunk r319262 - /trunk/main/dsp.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon May 16 16:08:53 CDT 2011
Author: jrose
Date: Mon May 16 16:08:50 2011
New Revision: 319262
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=319262
Log:
Merged revisions 319261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r319261 | jrose | 2011-05-16 16:00:55 -0500 (Mon, 16 May 2011) | 2 lines
Makes busy detection in dsp.c always allow for at least one frame (20ms) of error so that 200ms tone lengths don't get ignored by single frame error lengths.
........
Modified:
trunk/main/dsp.c
Modified: trunk/main/dsp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/dsp.c?view=diff&rev=319262&r1=319261&r2=319262
==============================================================================
--- trunk/main/dsp.c (original)
+++ trunk/main/dsp.c Mon May 16 16:08:50 2011
@@ -1273,7 +1273,7 @@
/* If we know the expected busy tone length, check we are in the range */
if (res && (dsp->busy_cadence.pattern[0] > 0)) {
- if (abs(avgtone - dsp->busy_cadence.pattern[0]) > (dsp->busy_cadence.pattern[0]*BUSY_PAT_PERCENT/100)) {
+ if (abs(avgtone - dsp->busy_cadence.pattern[0]) > MAX(dsp->busy_cadence.pattern[0]*BUSY_PAT_PERCENT/100, 20)) {
#ifdef BUSYDETECT_DEBUG
ast_debug(5, "busy detector: avgtone of %d not close enough to desired %d\n",
avgtone, dsp->busy_cadence.pattern[0]);
@@ -1284,7 +1284,7 @@
#ifndef BUSYDETECT_TONEONLY
/* If we know the expected busy tone silent-period length, check we are in the range */
if (res && (dsp->busy_cadence.pattern[1] > 0)) {
- if (abs(avgsilence - dsp->busy_cadence.pattern[1]) > (dsp->busy_cadence.pattern[1] * BUSY_PAT_PERCENT / 100)) {
+ if (abs(avgsilence - dsp->busy_cadence.pattern[1]) > MAX(dsp->busy_cadence.pattern[1]*BUSY_PAT_PERCENT/100, 20)) {
#ifdef BUSYDETECT_DEBUG
ast_debug(5, "busy detector: avgsilence of %d not close enough to desired %d\n",
avgsilence, dsp->busy_cadence.pattern[1]);
More information about the asterisk-commits
mailing list