diff options
author | David Vossel <dvossel@digium.com> | 2009-07-08 16:54:24 +0000 |
---|---|---|
committer | David Vossel <dvossel@digium.com> | 2009-07-08 16:54:24 +0000 |
commit | 15b94d1182ffdcf9a72b154f31b839abc51b06c1 (patch) | |
tree | 22704a3390ee130dfe47b1dd2c7267b1b497c0ec /include/asterisk | |
parent | e75ae63ac20af777144941d6611fb37527ce19f7 (diff) |
Merged revisions 205215 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r205215 | dvossel | 2009-07-08 11:53:40 -0500 (Wed, 08 Jul 2009) | 10 lines
ast_samp2tv needs floating point for 16khz audio
In ast_samp2tv(), (1000000 / _rate) = 62.5 when _rate is 16000.
The .5 is currently stripped off because we don't calculate
using floating points. This causes madness with 16khz audio.
(issue ABE-1899)
Review: https://reviewboard.asterisk.org/r/305/
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@205216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/time.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asterisk/time.h b/include/asterisk/time.h index 4b7ca00ff..fa8006e2a 100644 --- a/include/asterisk/time.h +++ b/include/asterisk/time.h @@ -171,7 +171,7 @@ struct timeval ast_tv(ast_time_t sec, ast_suseconds_t usec), AST_INLINE_API( struct timeval ast_samp2tv(unsigned int _nsamp, unsigned int _rate), { - return ast_tv(_nsamp / _rate, (_nsamp % _rate) * (1000000 / _rate)); + return ast_tv(_nsamp / _rate, (_nsamp % _rate) * (1000000 / (float) _rate)); } ) |