[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r329103 - in /team/irroot/di...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jul 21 08:15:29 CDT 2011
Author: irroot
Date: Thu Jul 21 08:15:25 2011
New Revision: 329103
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=329103
Log:
Add Squelch Flag
Modified:
team/irroot/distrotech-customers-trunk/include/asterisk/dsp.h
team/irroot/distrotech-customers-trunk/main/dsp.c
Modified: team/irroot/distrotech-customers-trunk/include/asterisk/dsp.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/include/asterisk/dsp.h?view=diff&rev=329103&r1=329102&r2=329103
==============================================================================
--- team/irroot/distrotech-customers-trunk/include/asterisk/dsp.h (original)
+++ team/irroot/distrotech-customers-trunk/include/asterisk/dsp.h Thu Jul 21 08:15:25 2011
@@ -45,8 +45,8 @@
#define DSP_FAXMODE_DETECT_CNG (1 << 0)
#define DSP_FAXMODE_DETECT_CED (1 << 1)
-#define DSP_FAXMODE_DETECT_SQUELCH (1 << 2)
-#define DSP_FAXMODE_DETECT_V21 (1 << 2)
+#define DSP_FAXMODE_DETECT_V21 (1 << 2)
+#define DSP_FAXMODE_DETECT_SQUELCH (1 << 3)
#define DSP_FAXMODE_DETECT_ALL (DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED | DSP_FAXMODE_DETECT_V21)
#define DSP_TONE_STATE_SILENCE 0
Modified: team/irroot/distrotech-customers-trunk/main/dsp.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/main/dsp.c?view=diff&rev=329103&r1=329102&r2=329103
==============================================================================
--- team/irroot/distrotech-customers-trunk/main/dsp.c (original)
+++ team/irroot/distrotech-customers-trunk/main/dsp.c Thu Jul 21 08:15:25 2011
@@ -527,6 +527,12 @@
ast_tone_detect_init(&s->cng_tone_state, FAX_TONE_CNG_FREQ, FAX_TONE_CNG_DURATION, FAX_TONE_CNG_DB, s->sample_rate);
ast_tone_detect_init(&s->ced_tone_state, FAX_TONE_CED_FREQ, FAX_TONE_CED_DURATION, FAX_TONE_CED_DB, s->sample_rate);
ast_v21_detect_init(&s->v21_state, s->sample_rate);
+ if (s->faxmode & DSP_FAXMODE_DETECT_SQUELCH) {
+ s->cng_tone_state.squelch = 1;
+ s->ced_tone_state.squelch = 1;
+ s->v21_state.squelch = 1;
+ }
+
}
static void ast_dtmf_detect_init (dtmf_detect_state_t *s, unsigned int sample_rate)
More information about the asterisk-commits
mailing list