[asterisk-commits] dvossel: branch dvossel/hd_confbridge r310134 - in /team/dvossel/hd_confbridg...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Mar 8 15:50:40 CST 2011
Author: dvossel
Date: Tue Mar 8 15:50:35 2011
New Revision: 310134
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=310134
Log:
Addition of the denoise option to ConfBridge user profiles
Modified:
team/dvossel/hd_confbridge/apps/app_confbridge.c
team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c
team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h
team/dvossel/hd_confbridge/configs/confbridge.conf.sample
Modified: team/dvossel/hd_confbridge/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/app_confbridge.c?view=diff&rev=310134&r1=310133&r2=310134
==============================================================================
--- team/dvossel/hd_confbridge/apps/app_confbridge.c (original)
+++ team/dvossel/hd_confbridge/apps/app_confbridge.c Tue Mar 8 15:50:35 2011
@@ -611,6 +611,15 @@
/* If the caller should be joined already muted, make it so */
if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_STARTMUTED)) {
conference_bridge_user.features.mute = 1;
+ }
+
+ if (ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_DENOISE)) {
+ char *mod_speex;
+ /* Reduce background noise from each participant */
+ if ((mod_speex = ast_module_helper("", "codec_speex", 0, 0, 0, 0))) {
+ ast_free(mod_speex);
+ ast_func_write(chan, "DENOISE(rx)", "on");
+ }
}
if (conference_bridge_user.u_profile.drop_silence) {
Modified: team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c?view=diff&rev=310134&r1=310133&r2=310134
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/conf_config_parser.c Tue Mar 8 15:50:35 2011
@@ -231,6 +231,10 @@
ast_log(LOG_WARNING, "drop_silence '%s' at line %d of %s is not supported.\n",
var->value, var->lineno, CONF_CONFIG);
}
+ } else if (!strcasecmp(var->name, "denoise")) {
+ u_profile->flags = ast_true(var->value) ?
+ u_profile->flags | USER_OPT_DENOISE :
+ u_profile->flags & ~USER_OPT_DENOISE;
} else {
ast_log(LOG_WARNING, "Unknown option '%s' at line %d of %s is not supported.\n",
var->name, var->lineno, CONF_CONFIG);
@@ -429,6 +433,9 @@
"enabled" : "disabled");
ast_cli(a->fd,"Wait Marked: %s\n",
u_profile.flags & USER_OPT_WAITMARKED ?
+ "enabled" : "disabled");
+ ast_cli(a->fd,"Denoise: %s\n",
+ u_profile.flags & USER_OPT_DENOISE ?
"enabled" : "disabled");
if (u_profile.drop_silence) {
ast_cli(a->fd,"Drop Silence: %dms\n",
Modified: team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h?view=diff&rev=310134&r1=310133&r2=310134
==============================================================================
--- team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h (original)
+++ team/dvossel/hd_confbridge/apps/confbridge/include/confbridge.h Tue Mar 8 15:50:35 2011
@@ -38,6 +38,7 @@
USER_OPT_QUIET = (1 << 5), /*!< Set if no audio prompts should be played */
USER_OPT_ANNOUNCEUSERCOUNT = (1 << 6), /*!< Set if the number of users should be announced to the caller */
USER_OPT_WAITMARKED = (1 << 7), /*!< Set if the conference must wait for a marked user before starting */
+ USER_OPT_DENOISE = (1 << 8), /*!< Sets if denoise filter should be used on audio before mixing. */
};
enum conf_menu_action_id {
Modified: team/dvossel/hd_confbridge/configs/confbridge.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/dvossel/hd_confbridge/configs/confbridge.conf.sample?view=diff&rev=310134&r1=310133&r2=310134
==============================================================================
--- team/dvossel/hd_confbridge/configs/confbridge.conf.sample (original)
+++ team/dvossel/hd_confbridge/configs/confbridge.conf.sample Tue Mar 8 15:50:35 2011
@@ -33,6 +33,9 @@
; milliseconds can be configured as well by assigning
; this option the number of milliseconds to wait before detecting
; silence instead of yes/no.
+;denoise=yes ; Sets whether or not a denoise filter should be applied
+ ; to the audio before mixing or not. Off by default. Requires
+ ; codec_speex to be built and installed.
[default_bridge]
type=bridge
More information about the asterisk-commits
mailing list