diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-07-26 17:04:54 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-07-26 17:04:54 +0000 |
commit | 2fa99a7ade8748fae314aeab2fea83e9bc88c36c (patch) | |
tree | 689c1cb15f7e7304b955e296748c800ce430542d /pjmedia/src/pjmedia/alaw_ulaw.c | |
parent | d80219f36636faa876c84b586e7b4b4815767be3 (diff) |
- Bring speex codec up to date with their SVN trunk
- Speex codec should work in FIXED_POINT mode when PJ_HAS_FLOATING_POINT is set to zero.
- ulaw2linear will return zero if zero is given (this would make the VAD works better, and it also fixed click noise when call is established/hangup).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@628 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia/alaw_ulaw.c')
-rw-r--r-- | pjmedia/src/pjmedia/alaw_ulaw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia/alaw_ulaw.c b/pjmedia/src/pjmedia/alaw_ulaw.c index 5fe119bb..1e2fe002 100644 --- a/pjmedia/src/pjmedia/alaw_ulaw.c +++ b/pjmedia/src/pjmedia/alaw_ulaw.c @@ -255,6 +255,12 @@ ulaw2linear( { int t; + /* Shortcut: when input is zero, output is zero + * This will also make the VAD works harder. + * -bennylp + */ + if (u_val == 0) return 0; + /* Complement to obtain normal u-law value. */ u_val = ~u_val; |