summaryrefslogtreecommitdiff
path: root/pjmedia/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2008-02-29 17:19:42 +0000
committerBenny Prijono <bennylp@teluu.com>2008-02-29 17:19:42 +0000
commit364a4cee9f53d438b67fa048e0d7f717ed7b1ab4 (patch)
treee9647a2a0a17b1252d0b36c6a8ef6d93a7f2a92f /pjmedia/include
parente773051f40d4e27afc1aa3f7ac15c0ee1e2c66f6 (diff)
Ticket #438: Workaround for frame bursts from audio devices: added wsola in delaybuf, and put delaybuf in the bridge
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1833 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r--pjmedia/include/pjmedia/delaybuf.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/pjmedia/include/pjmedia/delaybuf.h b/pjmedia/include/pjmedia/delaybuf.h
index bdb0dd1d..2141c481 100644
--- a/pjmedia/include/pjmedia/delaybuf.h
+++ b/pjmedia/include/pjmedia/delaybuf.h
@@ -66,15 +66,17 @@ typedef struct pjmedia_delay_buf pjmedia_delay_buf;
* from.
* @param name Optional name for the buffer for log
* identification.
+ * @param clock_rate Number of samples processed per second.
* @param samples_per_frame Number of samples per frame.
- * @param max_cnt Maximum number of delay to be accommodated,
+ * @param max_frames Maximum number of delay to be accommodated,
* in number of frames.
* @param delay The delay to be applied, in number of frames.
- * If the value is -1, the delay buffer will
+ * If the value is -1 or 0, the delay buffer will
* learn about the delay automatically. If
* the value is greater than zero, then this
* value will be used and no learning will be
* performed.
+ * @param option Option flags, must be zero for now.
* @param p_b Pointer to receive the delay buffer instance.
*
* @return PJ_SUCCESS if the delay buffer has been
@@ -83,9 +85,11 @@ typedef struct pjmedia_delay_buf pjmedia_delay_buf;
*/
PJ_DECL(pj_status_t) pjmedia_delay_buf_create(pj_pool_t *pool,
const char *name,
+ unsigned clock_rate,
unsigned samples_per_frame,
- unsigned max_cnt,
+ unsigned max_frames,
int delay,
+ unsigned options,
pjmedia_delay_buf **p_b);
/**
@@ -131,6 +135,25 @@ PJ_DECL(pj_status_t) pjmedia_delay_buf_get(pjmedia_delay_buf *b,
*/
PJ_DECL(pj_status_t) pjmedia_delay_buf_learn(pjmedia_delay_buf *b);
+/**
+ * Reset delay buffer. This will clear the buffer's content. But keep
+ * the learning result.
+ *
+ * @param b The delay buffer.
+ *
+ * @return PJ_SUCCESS on success or the appropriate error.
+ */
+PJ_DECL(pj_status_t) pjmedia_delay_buf_reset(pjmedia_delay_buf *b);
+
+/**
+ * Destroy delay buffer.
+ *
+ * @param b Delay buffer session.
+ *
+ * @return PJ_SUCCESS normally.
+ */
+PJ_DECL(pj_status_t) pjmedia_delay_buf_destroy(pjmedia_delay_buf *b);
+
PJ_END_DECL