[asterisk-commits] dvossel: branch 1.6.1 r205605 - in /branches/1.6.1: ./ include/asterisk/time.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 9 11:20:30 CDT 2009


Author: dvossel
Date: Thu Jul  9 11:20:27 2009
New Revision: 205605

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=205605
Log:
Merged revisions 205600 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r205600 | dvossel | 2009-07-09 11:19:09 -0500 (Thu, 09 Jul 2009) | 9 lines
  
  Merged revisions 205599 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r205599 | dvossel | 2009-07-09 11:18:09 -0500 (Thu, 09 Jul 2009) | 2 lines
    
    Changing ast_samp2tv to not use floating point.
  ........
................

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

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/include/asterisk/time.h
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.1/include/asterisk/time.h?view=diff&rev=205605&r1=205604&r2=205605
==============================================================================
--- branches/1.6.1/include/asterisk/time.h (original)
+++ branches/1.6.1/include/asterisk/time.h Thu Jul  9 11:20:27 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 / (float) _rate));
+	return ast_tv(_nsamp / _rate, ((_nsamp % _rate) * (4000000 / _rate)) / 4); /* this calculation is accurate up to 32000Hz. */
 }
 )
 




More information about the asterisk-commits mailing list