[asterisk-commits] oej: branch oej/silence-detection-games-1.8 r411816 - /team/oej/silence-detec...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 7 10:11:22 CDT 2014


Author: oej
Date: Mon Apr  7 10:11:19 2014
New Revision: 411816

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=411816
Log:
Fixing stuff.

Modified:
    team/oej/silence-detection-games-1.8/main/silencedetection.c

Modified: team/oej/silence-detection-games-1.8/main/silencedetection.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/silence-detection-games-1.8/main/silencedetection.c?view=diff&rev=411816&r1=411815&r2=411816
==============================================================================
--- team/oej/silence-detection-games-1.8/main/silencedetection.c (original)
+++ team/oej/silence-detection-games-1.8/main/silencedetection.c Mon Apr  7 10:11:19 2014
@@ -56,6 +56,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/audiohook.h"
 #include "asterisk/dsp.h"
+#include "asterisk/silencedetection.h"
 
 
 /*! Our own datastore */
@@ -131,15 +132,15 @@
 				ast_debug(8, " ++++ Silence started ++++ on chan %s\n", chan->name);
 			}
 			if (!dsptime) {
-				if (option_debug && p->silencecounter > 0) {
+				if (option_debug && sildet->silencecounter > 0) {
 					ast_debug(8, " ++++ Silence stopped ++++ on chan %s\n", chan->name);
 				}
-				p->silencecounter = 0;		/* No more silence */
+				sildet->silencecounter = 0;		/* No more silence */
 			} else {
-				if (option_debug && p->silencecounter > 0) {
+				if (option_debug && sildet->silencecounter > 0) {
 					ast_debug(8, "          ++++ Silence continues ++++ on chan %s\n", chan->name);
 				}
-				p->silencecounter++;
+				sildet->silencecounter++;
 			}
 			/* Ok, we just want to reset all audio in this frame. Keep NOTHING, thanks. */
 			ast_frame_clear(frame);
@@ -169,7 +170,7 @@
 		ast_datastore_free(datastore);
 		return NULL;
 	}
-	if (!(sildet>dsp = ast_dsp_new())) {
+	if (!(sildet->dsp = ast_dsp_new())) {
 		/* We failed to create a DSP */
 		ast_log(LOG_WARNING, "Unable to create silence detector :(\n");
 		ast_free(sildet);




More information about the asterisk-commits mailing list