fix typo in tone detect (bug #3315)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2005-01-13 05:06:49 +00:00
parent d9d070e30b
commit a6fb9eef88

4
dsp.c
View File

@@ -1308,10 +1308,10 @@ int ast_dsp_busydetect(struct ast_dsp *dsp)
}
#endif
if (avgtone > dsp->historicnoise[x]) {
if (avgtone - (avgtone / BUSY_PERCENT) <= dsp->historicsilence[x])
if (avgtone - (avgtone / BUSY_PERCENT) <= dsp->historicnoise[x])
hittone++;
} else {
if (avgtone + (avgtone / BUSY_PERCENT) >= dsp->historicsilence[x])
if (avgtone + (avgtone / BUSY_PERCENT) >= dsp->historicnoise[x])
hittone++;
}
}