Fix typo in tone detect (bug #3315)
authorMark Spencer <markster@digium.com>
Tue, 11 Jan 2005 18:10:30 +0000 (18:10 +0000)
committerMark Spencer <markster@digium.com>
Tue, 11 Jan 2005 18:10:30 +0000 (18:10 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4759 65c4cc65-6c06-0410-ace0-fbb531ad65f3

dsp.c

diff --git a/dsp.c b/dsp.c
index 60787ec..ff091a6 100755 (executable)
--- a/dsp.c
+++ b/dsp.c
@@ -1196,10 +1196,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++;
                }
        }