[svn-commits] mjordan: branch 1.8 r382227 - in /branches/1.8: UPGRADE.txt apps/app_meetme.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Feb 28 10:40:36 CST 2013


Author: mjordan
Date: Thu Feb 28 10:40:31 2013
New Revision: 382227

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382227
Log:
Let channels joining a MeetMe conference opt out of the denoiser

For some channel drivers, specifically those that have a varying rate in the
number of audio samples, the audio quality for a MeetMe conference can be
exceedingly poor. This is due to a unilateral application of the DENOISE
function in func_speex to channels joining the conference.

The denoiser function in the speex library is initialized with the number of
audio samples in each sample that will be provided to it. If the number of
audio samples changes, the denoiser has to be thrown away and re-initialized.

While this could be worked around by removing func_speex, that doesn't help
if you actually use the denoiser with other channels on the system.

This patches does the following:
 * Checks for the presence of func_speex as opposed to codec_speex when
   determining if the DENOISE function is present (which is where the function
   is actually implemented)
 * Adds an option to MeetMe 'n' that causes the denoiser to not be applied
   to a channel when it joins. This keeps the current behavior the default, but
   let's users disable the denoiser if it causes problems on their system.

Review: https://reviewboard.asterisk.org/r/2358

(closes issue AST-1062)
Reported by: Thomas Arimont


Modified:
    branches/1.8/UPGRADE.txt
    branches/1.8/apps/app_meetme.c

Modified: branches/1.8/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/UPGRADE.txt?view=diff&rev=382227&r1=382226&r2=382227
==============================================================================
--- branches/1.8/UPGRADE.txt (original)
+++ branches/1.8/UPGRADE.txt Thu Feb 28 10:40:31 2013
@@ -18,6 +18,13 @@
 ===
 ===========================================================
 
+from 1.8.21.0 to 1.8.22.0:
+* Added the 'n' option to MeetMe to prevent application of the DENOISE function
+  to a channel joining a conference. Some channel drivers that vary the number
+  of audio samples in a voice frame will experience significant quality problems
+  if a denoiser is attached to the channel; this option gives them the ability
+  to remove the denoiser without having to unload func_speex.
+
 from 1.8.20.0 to 1.8.20.1:
 * Asterisk would previously not output certain error messages when a remote
   console attempted to connect to Asterisk and no instance of Asterisk was

Modified: branches/1.8/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/apps/app_meetme.c?view=diff&rev=382227&r1=382226&r2=382227
==============================================================================
--- branches/1.8/apps/app_meetme.c (original)
+++ branches/1.8/apps/app_meetme.c Thu Feb 28 10:40:31 2013
@@ -133,6 +133,14 @@
 						specify a musiconhold class to use. If one is not provided, it will use the
 						channel's currently set music class, or <literal>default</literal>.</para>
 						<argument name="class" required="true" />
+					</option>
+					<option name="n">
+						<para>Disable the denoiser. By default, if <literal>func_speex</literal> is loaded, Asterisk
+						will apply a denoiser to channels in the MeetMe conference. However, channel
+						drivers that present audio with a varying rate will experience degraded
+						performance with a denoiser attached. This parameter allows a channel joining
+						the conference to choose not to have a denoiser attached without having to
+						unload <literal>func_speex</literal>.</para>
 					</option>
 					<option name="o">
 						<para>Set talker optimization - treats talkers who aren't speaking as
@@ -618,6 +626,8 @@
 #define CONFFLAG_NO_AUDIO_UNTIL_UP  (1ULL << 31)
 /*! If set play an intro announcement at start of conference */
 #define CONFFLAG_INTROMSG           (1ULL << 32)
+/*! If set, don't enable a denoiser for the channel */
+#define CONFFLAG_DONT_DENOISE       (1ULL << 33)
 
 enum {
 	OPT_ARG_WAITMARKED = 0,
@@ -645,6 +655,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('n', CONFFLAG_DONT_DENOISE ),
 	AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
 	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
 	AST_APP_OPTION_ARG('p', CONFFLAG_KEYEXIT, OPT_ARG_EXITKEYS ),
@@ -3089,7 +3100,8 @@
 	}
 
 	/* Reduce background noise from each participant */
-	if ((mod_speex = ast_module_helper("", "codec_speex", 0, 0, 0, 0))) {
+	if (!ast_test_flag64(confflags, CONFFLAG_DONT_DENOISE) &&
+		(mod_speex = ast_module_helper("", "func_speex", 0, 0, 0, 0))) {
 		ast_free(mod_speex);
 		ast_func_write(chan, "DENOISE(rx)", "on");
 	}




More information about the svn-commits mailing list