[Scummvm-cvs-logs] SF.net SVN: scummvm: [27779] scummvm/trunk/sound/rate.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Jun 30 01:33:17 CEST 2007


Revision: 27779
          http://scummvm.svn.sourceforge.net/scummvm/?rev=27779&view=rev
Author:   fingolfin
Date:     2007-06-29 16:33:16 -0700 (Fri, 29 Jun 2007)

Log Message:
-----------
Added small explanatory comment

Modified Paths:
--------------
    scummvm/trunk/sound/rate.cpp

Modified: scummvm/trunk/sound/rate.cpp
===================================================================
--- scummvm/trunk/sound/rate.cpp	2007-06-29 23:08:15 UTC (rev 27778)
+++ scummvm/trunk/sound/rate.cpp	2007-06-29 23:33:16 UTC (rev 27779)
@@ -196,7 +196,11 @@
 
 	opos = FRAC_ONE;
 
-	/* increment */
+	// Compute the linear interpolation increment.
+	// This will overflow if inrate >= 2^16, and underflow if outrate >= 2^16.
+	// Also, if the quotient of the two rate becomes too small / too big, that
+	// would cause problems, but since we rarely scale from 1 to 65536 Hz or vice
+	// versa, I think we can live with that limiation ;-).
 	opos_inc = (inrate << FRAC_BITS) / outrate;
 
 	ilast0 = ilast1 = 0;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list