Fix typo in tone detect (bug #3315)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.2-netsec
Mark Spencer 21 years ago
parent 60b57a20b7
commit b846c71e0a

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

Loading…
Cancel
Save