[asterisk-commits] [svn-commits] qwell: trunk r111028 - /trunk/main/dsp.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 26 14:16:32 CDT 2008


Author: qwell
Date: Wed Mar 26 14:16:31 2008
New Revision: 111028

URL: http://svn.digium.com/view/asterisk?view=rev&rev=111028
Log:
Only try to detect silence when we actually need to, instead of...always.

If this is wrong, I'd love to hear why.

Modified:
    trunk/main/dsp.c

Modified: trunk/main/dsp.c
URL: http://svn.digium.com/view/asterisk/trunk/main/dsp.c?view=diff&rev=111028&r1=111027&r2=111028
==============================================================================
--- trunk/main/dsp.c (original)
+++ trunk/main/dsp.c Wed Mar 26 14:16:31 2008
@@ -1301,7 +1301,11 @@
 	/* Initially we do not want to mute anything */
 	dsp->mute_fragments = 0;
 
-	res = __ast_dsp_silence_noise(dsp, shortdata, len, &silence, NULL);
+	/* Need to run the silence detection stuff for silence suppression and busy detection */
+	if ((dsp->features & DSP_FEATURE_SILENCE_SUPPRESS) || (dsp->features & DSP_FEATURE_BUSY_DETECT)) {
+		res = __ast_dsp_silence_noise(dsp, shortdata, len, &silence, NULL);
+	}
+
 	if ((dsp->features & DSP_FEATURE_SILENCE_SUPPRESS) && silence) {
 		memset(&dsp->f, 0, sizeof(dsp->f));
 		dsp->f.frametype = AST_FRAME_NULL;


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the asterisk-commits mailing list