[asterisk-commits] dvossel: trunk r205216 - in /trunk: ./ include/asterisk/time.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 8 11:54:27 CDT 2009


Author: dvossel
Date: Wed Jul  8 11:54:24 2009
New Revision: 205216

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205216
Log:
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/
........

Modified:
    trunk/   (props changed)
    trunk/include/asterisk/time.h

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/include/asterisk/time.h
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/include/asterisk/time.h?view=diff&rev=205216&r1=205215&r2=205216
==============================================================================
--- trunk/include/asterisk/time.h (original)
+++ trunk/include/asterisk/time.h Wed Jul  8 11:54:24 2009
@@ -171,7 +171,7 @@
 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));
 }
 )
 




More information about the asterisk-commits mailing list