remove the need to have the BUSYDETECT routine defined in the CFLAGS unless
authorRussell Bryant <russell@russellbryant.com>
Mon, 25 Jul 2005 21:57:14 +0000 (21:57 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 25 Jul 2005 21:57:14 +0000 (21:57 +0000)
you want to use one other than the default

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6206 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
dsp.c

index 5da4ff7..3e37653 100755 (executable)
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ DESTDIR=
 BUSYDETECT = #-DBUSYDETECT
 
 # Improved busydetect routine, comment the previous one if you use this one
-BUSYDETECT+= -DBUSYDETECT_MARTIN 
+BUSYDETECT+= #-DBUSYDETECT_MARTIN 
 # Detect the busy signal looking only at tone lengths
 # For example if you have 3 beeps 100ms tone, 100ms silence separated by 500 ms of silence
 BUSYDETECT+= #-DBUSYDETECT_TONEONLY
diff --git a/dsp.c b/dsp.c
index 3ea3cf2..3f370f3 100755 (executable)
--- a/dsp.c
+++ b/dsp.c
@@ -151,6 +151,10 @@ static struct progress {
 #define BELL_MF_RELATIVE_PEAK  12.6    /* 11dB */
 #endif
 
+#if !defined(BUSYDETECT_MARTIN) && !defined(BUSYDETECT) && !defined(BUSYDETECT_TONEONLY) && !defined(BUSYDETECT_COMPARE_TONE_AND_SILENCE)
+#define BUSYDETECT_MARTIN
+#endif
+
 typedef struct {
        float v2;
        float v3;