[asterisk-commits] russell: branch 1.6.0 r177135 - in /branches/1.6.0: ./ apps/app_meetme.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Feb 18 13:25:04 CST 2009


Author: russell
Date: Wed Feb 18 13:25:03 2009
New Revision: 177135

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=177135
Log:
Merged revisions 177101 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
r177101 | russell | 2009-02-18 13:12:49 -0600 (Wed, 18 Feb 2009) | 8 lines

Re-add 'o' option to MeetMe, reverting rev 62297.

Enabling this option by default proved to be a bad idea, as the talker detection
is not very reliable.  So, make it optional again, and off by default.

(issue #13801)
Reported by: justdave

........

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/apps/app_meetme.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.0/apps/app_meetme.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/apps/app_meetme.c?view=diff&rev=177135&r1=177134&r2=177135
==============================================================================
--- branches/1.6.0/apps/app_meetme.c (original)
+++ branches/1.6.0/apps/app_meetme.c Wed Feb 18 13:25:03 2009
@@ -145,6 +145,8 @@
 	CONFFLAG_EMPTY = (1 << 18),
 	CONFFLAG_EMPTYNOPIN = (1 << 19),
 	CONFFLAG_ALWAYSPROMPT = (1 << 20),
+	/*! If set, treat talking users as muted users */
+	CONFFLAG_OPTIMIZETALKER = (1 << 21),
 	/*! If set, won't speak the extra prompt when the first person 
 	 *  enters the conference */
 	CONFFLAG_NOONLYPERSON = (1 << 22),
@@ -189,6 +191,7 @@
 	AST_APP_OPTION('I', CONFFLAG_INTROUSERNOREVIEW ),
 	AST_APP_OPTION_ARG('M', CONFFLAG_MOH, OPT_ARG_MOH_CLASS ),
 	AST_APP_OPTION('m', CONFFLAG_STARTMUTED ),
+	AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
 	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
 	AST_APP_OPTION_ARG('p', CONFFLAG_KEYEXIT, OPT_ARG_EXITKEYS ),
 	AST_APP_OPTION('q', CONFFLAG_QUIET ),
@@ -2093,7 +2096,7 @@
 			x = 1;
 			ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
 		}	
-		if (!(confflags & CONFFLAG_MONITOR) && !(dsp = ast_dsp_new())) {
+		if ((confflags & CONFFLAG_OPTIMIZETALKER) && !(confflags & CONFFLAG_MONITOR) && !(dsp = ast_dsp_new())) {
 			ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
 			res = -1;
 		}
@@ -2410,7 +2413,7 @@
 					if (user->talk.actual)
 						ast_frame_adjust_volume(f, user->talk.actual);
 
-					if (!(confflags & CONFFLAG_MONITOR)) {
+					if ((confflags & CONFFLAG_OPTIMIZETALKER) && !(confflags & CONFFLAG_MONITOR)) {
 						int totalsilence;
 
 						if (user->talking == -1)
@@ -2453,8 +2456,9 @@
 						   don't want to block, but we do want to at least *try*
 						   to write out all the samples.
 						 */
-						if (user->talking)
+						if (user->talking && !(confflags & CONFFLAG_OPTIMIZETALKER)) {
 							careful_write(fd, f->data, f->datalen, 0);
+						}
 					}
 				} else if (((f->frametype == AST_FRAME_DTMF) && (f->subclass == '*') && (confflags & CONFFLAG_STARMENU)) || ((f->frametype == AST_FRAME_DTMF) && menu_active)) {
 					if (confflags & CONFFLAG_PASS_DTMF)
@@ -2672,10 +2676,11 @@
 					fr.samples = res / 2;
 					fr.data = buf;
 					fr.offset = AST_FRIENDLY_OFFSET;
-					if (!user->listen.actual && 
-						((confflags & CONFFLAG_MONITOR) || 
+					if (!user->listen.actual &&
+						((confflags & CONFFLAG_MONITOR) ||
 						 (user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) ||
-						 (!user->talking)) ) {
+						 (!user->talking && (confflags & CONFFLAG_OPTIMIZETALKER))
+						 )) {
 						int index;
 						for (index = 0; index < AST_FRAME_BITS; index++)
 							if (chan->rawwriteformat & (1 << index))




More information about the asterisk-commits mailing list