Enable the functionality of the 'o' option to "optimize talker" by default.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Russell Bryant 19 years ago
parent 7d2102c081
commit dd601f4f38

@ -145,8 +145,6 @@ enum {
CONFFLAG_EMPTY = (1 << 18), CONFFLAG_EMPTY = (1 << 18),
CONFFLAG_EMPTYNOPIN = (1 << 19), CONFFLAG_EMPTYNOPIN = (1 << 19),
CONFFLAG_ALWAYSPROMPT = (1 << 20), CONFFLAG_ALWAYSPROMPT = (1 << 20),
/*! If set, treats talking users as muted users */
CONFFLAG_OPTIMIZETALKER = (1 << 21),
/*! If set, won't speak the extra prompt when the first person /*! If set, won't speak the extra prompt when the first person
* enters the conference */ * enters the conference */
CONFFLAG_NOONLYPERSON = (1 << 22), CONFFLAG_NOONLYPERSON = (1 << 22),
@ -183,7 +181,6 @@ AST_APP_OPTIONS(meetme_opts, BEGIN_OPTIONS
AST_APP_OPTION('I', CONFFLAG_INTROUSERNOREVIEW ), AST_APP_OPTION('I', CONFFLAG_INTROUSERNOREVIEW ),
AST_APP_OPTION('M', CONFFLAG_MOH ), AST_APP_OPTION('M', CONFFLAG_MOH ),
AST_APP_OPTION('m', CONFFLAG_STARTMUTED ), AST_APP_OPTION('m', CONFFLAG_STARTMUTED ),
AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ), AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ), AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
AST_APP_OPTION('q', CONFFLAG_QUIET ), AST_APP_OPTION('q', CONFFLAG_QUIET ),
@ -1694,7 +1691,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
x = 1; x = 1;
ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0); ast_channel_setoption(chan, AST_OPTION_TONE_VERIFY, &x, sizeof(char), 0);
} }
if (confflags & (CONFFLAG_MONITORTALKER | CONFFLAG_OPTIMIZETALKER) && !(dsp = ast_dsp_new())) { if (!(dsp = ast_dsp_new())) {
ast_log(LOG_WARNING, "Unable to allocate DSP!\n"); ast_log(LOG_WARNING, "Unable to allocate DSP!\n");
res = -1; res = -1;
} }
@ -1893,7 +1890,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
if (user->talk.actual) if (user->talk.actual)
ast_frame_adjust_volume(f, user->talk.actual); ast_frame_adjust_volume(f, user->talk.actual);
if (confflags & (CONFFLAG_MONITORTALKER | CONFFLAG_OPTIMIZETALKER)) { {
int totalsilence; int totalsilence;
if (user->talking == -1) if (user->talking == -1)
@ -1936,7 +1933,7 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
don't want to block, but we do want to at least *try* don't want to block, but we do want to at least *try*
to write out all the samples. to write out all the samples.
*/ */
if (user->talking || !(confflags & CONFFLAG_OPTIMIZETALKER)) if (user->talking)
careful_write(fd, f->data, f->datalen, 0); careful_write(fd, f->data, f->datalen, 0);
} }
} else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT)) { } else if ((f->frametype == AST_FRAME_DTMF) && (confflags & CONFFLAG_EXIT_CONTEXT)) {
@ -2138,11 +2135,10 @@ static int conf_run(struct ast_channel *chan, struct ast_conference *conf, int c
fr.samples = res/2; fr.samples = res/2;
fr.data = buf; fr.data = buf;
fr.offset = AST_FRIENDLY_OFFSET; fr.offset = AST_FRIENDLY_OFFSET;
if (!user->listen.actual && if ( !user->listen.actual &&
((confflags & CONFFLAG_MONITOR) || ((confflags & CONFFLAG_MONITOR) ||
(user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) || (user->adminflags & (ADMINFLAG_MUTED | ADMINFLAG_SELFMUTED)) ||
(!user->talking && (confflags & CONFFLAG_OPTIMIZETALKER)) (!user->talking)) ) {
)) {
int index; int index;
for (index=0;index<AST_FRAME_BITS;index++) for (index=0;index<AST_FRAME_BITS;index++)
if (chan->rawwriteformat & (1 << index)) if (chan->rawwriteformat & (1 << index))

Loading…
Cancel
Save