summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-08-07 10:24:52 +0000
committerBenny Prijono <bennylp@teluu.com>2006-08-07 10:24:52 +0000
commitc14e6bf7c11fb28266cab45ccaa477a54fe3fd59 (patch)
treef05279a71b587759964bb0c16fee5259422f2c43 /pjsip
parent7786b1e99d249798e0e394bf473b954b3a612072 (diff)
Change set_ec_tail() API to set_ec() in sound port, also change suppressor to reduce mic signal by division rather than zeroing the signal. Also moved out VAD and EC settings to config.h.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@658 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h11
-rw-r--r--pjsip/src/pjsua-lib/pjsua_media.c11
2 files changed, 16 insertions, 6 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index da921c44..e2ae3857 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -2133,6 +2133,13 @@ struct pjsua_media_config
unsigned rx_drop_pct;
/**
+ * Echo canceller options (see #pjmedia_echo_create())
+ *
+ * Default: 0.
+ */
+ unsigned ec_options;
+
+ /**
* Echo canceller tail length, in miliseconds.
*
* Default: 128 (PJSUA_DEFAULT_EC_TAIL_LEN)
@@ -2506,10 +2513,12 @@ PJ_DECL(pjmedia_port*) pjsua_set_no_snd_dev(void);
*
* @param tail_ms The tail length, in miliseconds. Set to zero to
* disable AEC.
+ * @param options Options to be passed to #pjmedia_echo_create().
+ * Normally the value should be zero.
*
* @return PJ_SUCCESS on success.
*/
-PJ_DECL(pj_status_t) pjsua_set_ec_tail(unsigned tail_ms);
+PJ_DECL(pj_status_t) pjsua_set_ec(unsigned tail_ms, unsigned options);
/**
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c
index d3c3eb2e..849d1952 100644
--- a/pjsip/src/pjsua-lib/pjsua_media.c
+++ b/pjsip/src/pjsua-lib/pjsua_media.c
@@ -969,8 +969,9 @@ PJ_DEF(pj_status_t) pjsua_set_snd_dev( int capture_dev,
pj_assert(conf_port != NULL);
/* Set AEC */
- pjmedia_snd_port_set_ec_tail(pjsua_var.snd_port, pjsua_var.pool,
- pjsua_var.media_cfg.ec_tail_len);
+ pjmedia_snd_port_set_ec( pjsua_var.snd_port, pjsua_var.pool,
+ pjsua_var.media_cfg.ec_tail_len,
+ pjsua_var.media_cfg.ec_options);
/* Connect sound port to the bridge */
status = pjmedia_snd_port_connect(pjsua_var.snd_port,
@@ -1044,13 +1045,13 @@ PJ_DEF(pjmedia_port*) pjsua_set_no_snd_dev(void)
/*
* Configure the AEC settings of the sound port.
*/
-PJ_DEF(pj_status_t) pjsua_set_ec_tail(unsigned tail_ms)
+PJ_DEF(pj_status_t) pjsua_set_ec(unsigned tail_ms, unsigned options)
{
pjsua_var.media_cfg.ec_tail_len = tail_ms;
if (pjsua_var.snd_port)
- return pjmedia_snd_port_set_ec_tail(pjsua_var.snd_port, pjsua_var.pool,
- tail_ms);
+ return pjmedia_snd_port_set_ec( pjsua_var.snd_port, pjsua_var.pool,
+ tail_ms, options);
return PJ_SUCCESS;
}