diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-05-15 12:54:28 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-05-15 12:54:28 +0000 |
commit | 9d61f9ded11c24cef9c18962c65fda728e871568 (patch) | |
tree | 1313ee0a832c5830c956b8168e107610750d9417 /pjmedia/include | |
parent | 662b61f41a7da47a976ff29fd33ebfa860be05b7 (diff) |
Fixed #1257: Option for using simple FIFO delay buffer in echo canceller.
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3567 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/include')
-rw-r--r-- | pjmedia/include/pjmedia/delaybuf.h | 20 | ||||
-rw-r--r-- | pjmedia/include/pjmedia/echo.h | 10 |
2 files changed, 28 insertions, 2 deletions
diff --git a/pjmedia/include/pjmedia/delaybuf.h b/pjmedia/include/pjmedia/delaybuf.h index 9dcad5ee..09b01bbb 100644 --- a/pjmedia/include/pjmedia/delaybuf.h +++ b/pjmedia/include/pjmedia/delaybuf.h @@ -64,6 +64,19 @@ PJ_BEGIN_DECL typedef struct pjmedia_delay_buf pjmedia_delay_buf; /** + * Delay buffer options. + */ +typedef enum pjmedia_delay_buf_flag +{ + /** + * Use simple FIFO mechanism for the delay buffer, i.e. + * without WSOLA for expanding and shrinking audio samples. + */ + PJMEDIA_DELAY_BUF_SIMPLE_FIFO = 1 + +} pjmedia_delay_buf_flag; + +/** * Create the delay buffer. Once the delay buffer is created, it will * enter learning state unless the delay argument is specified, which * in this case it will directly enter the running state. @@ -79,7 +92,12 @@ typedef struct pjmedia_delay_buf pjmedia_delay_buf; * in ms, if this value is negative or less than * one frame time, default maximum delay used is * 400 ms. - * @param options Option flags, must be zero for now. + * @param options Options. If PJMEDIA_DELAY_BUF_SIMPLE_FIFO is + * specified, then a simple FIFO mechanism + * will be used instead of the adaptive + * implementation (which uses WSOLA to expand + * or shrink audio samples). + * See #pjmedia_delay_buf_flag for other options. * @param p_b Pointer to receive the delay buffer instance. * * @return PJ_SUCCESS if the delay buffer has been diff --git a/pjmedia/include/pjmedia/echo.h b/pjmedia/include/pjmedia/echo.h index f2c2210c..ba7f8897 100644 --- a/pjmedia/include/pjmedia/echo.h +++ b/pjmedia/include/pjmedia/echo.h @@ -88,7 +88,15 @@ typedef enum pjmedia_echo_flag * for the echo canceller, but application will guarantee that echo * canceller will not be called by different threads at the same time. */ - PJMEDIA_ECHO_NO_LOCK = 16 + PJMEDIA_ECHO_NO_LOCK = 16, + + /** + * If PJMEDIA_ECHO_USE_SIMPLE_FIFO flag is specified, the delay buffer + * created for the echo canceller will use simple FIFO mechanism, i.e. + * without using WSOLA to expand and shrink audio samples. + */ + PJMEDIA_ECHO_USE_SIMPLE_FIFO = 32 + } pjmedia_echo_flag; |