summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-08-04 18:27:19 +0000
committerBenny Prijono <bennylp@teluu.com>2006-08-04 18:27:19 +0000
commit3474adb4cba6d8f0e3a2858a59f64683ae8153ad (patch)
treea0524cf2c80fafe1691a2da330bf5352b2b5c087 /pjmedia/include
parentca972f8eb9678ff162c6e7acc4059b8bec5fb43c (diff)
More work on the AEC (including changes in PJSUA), embed the AEC in sound_port, reduce DirectSound buffer from 32 to 16, and fixed ARM compilation for MSVC WinCE target.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@648 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/aec.h4
-rw-r--r--pjmedia/include/pjmedia/aec_port.h4
-rw-r--r--pjmedia/include/pjmedia/sound_port.h34
3 files changed, 38 insertions, 4 deletions
diff --git a/pjmedia/include/pjmedia/aec.h b/pjmedia/include/pjmedia/aec.h
index a2354ef3..84ed7e0f 100644
--- a/pjmedia/include/pjmedia/aec.h
+++ b/pjmedia/include/pjmedia/aec.h
@@ -51,14 +51,14 @@ typedef struct pjmedia_aec pjmedia_aec;
* @param pool Pool to allocate memory.
* @param clock_rate Media clock rate/sampling rate.
* @param samples_per_frame Number of samples per frame.
- * @param tail_size Tail length, in number of samples.
+ * @param tail_ms Tail length, miliseconds.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_aec_create( pj_pool_t *pool,
unsigned clock_rate,
unsigned samples_per_frame,
- unsigned tail_size,
+ unsigned tail_ms,
unsigned options,
pjmedia_aec **p_aec );
diff --git a/pjmedia/include/pjmedia/aec_port.h b/pjmedia/include/pjmedia/aec_port.h
index f18b1378..2968c915 100644
--- a/pjmedia/include/pjmedia/aec_port.h
+++ b/pjmedia/include/pjmedia/aec_port.h
@@ -43,14 +43,14 @@ PJ_BEGIN_DECL
*
* @param pool Pool to allocate memory.
* @param dn_port Downstream port.
- * @param tail_length Tail length in samples.
+ * @param tail_ms Tail length in miliseconds.
* @param p_port Pointer to receive the port instance.
*
* @return PJ_SUCCESS on success.
*/
PJ_DECL(pj_status_t) pjmedia_aec_port_create( pj_pool_t *pool,
pjmedia_port *dn_port,
- unsigned tail_length,
+ unsigned tail_ms,
pjmedia_port **p_port );
diff --git a/pjmedia/include/pjmedia/sound_port.h b/pjmedia/include/pjmedia/sound_port.h
index 15339bcc..c144275d 100644
--- a/pjmedia/include/pjmedia/sound_port.h
+++ b/pjmedia/include/pjmedia/sound_port.h
@@ -183,6 +183,40 @@ PJ_DECL(pjmedia_snd_stream*) pjmedia_snd_port_get_snd_stream(
/**
+ * Enable accoustic echo cancellation (AEC) to the specified sound.
+ * The AEC can only be enabled for sound streams with full-duplex direction.
+ *
+ * And note, you should only change the AEC settings when the sound port
+ * is not connected to any downstream ports.
+ *
+ * @param snd_port The sound device port.
+ * @param pool Pool to re-create the AEC if necessary.
+ * @param tail_ms Maximum echo tail length to be supported, in
+ * miliseconds. If zero is specified, the AEC would
+ * be disabled.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_set_aec(pjmedia_snd_port *snd_port,
+ pj_pool_t *pool,
+ unsigned tail_ms);
+
+
+/**
+ * Get current AEC tail length, in miliseconds. The tail length will be zero
+ * if AEC is not enabled.
+ *
+ * @param snd_port The sound device port.
+ * @param p_length Pointer to receive the tail length.
+ *
+ * @return PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_snd_port_get_aec_tail(pjmedia_snd_port *snd_port,
+ unsigned *p_length);
+
+
+
+/**
* Connect a port to the sound device port. If the sound device port has a
* sound recorder device, then this will start periodic function call to
* the port's put_frame() function. If the sound device has a sound player