[xiph-commits] r16224 - trunk/vorbis/examples

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Tue Jul 7 23:24:49 PDT 2009


Author: xiphmont
Date: 2009-07-07 23:24:49 -0700 (Tue, 07 Jul 2009)
New Revision: 16224

Modified:
   trunk/vorbis/examples/decoder_example.c
Log:
applied Trac #1548


Modified: trunk/vorbis/examples/decoder_example.c
===================================================================
--- trunk/vorbis/examples/decoder_example.c	2009-07-08 06:21:02 UTC (rev 16223)
+++ trunk/vorbis/examples/decoder_example.c	2009-07-08 06:24:49 UTC (rev 16224)
@@ -248,7 +248,7 @@
                     float  *mono=pcm[i];
                     for(j=0;j<bout;j++){
 #if 1
-                      int val=mono[j]*32767.f;
+                      int val=floor(mono[j]*32767.f+.5f);
 #else /* optional dither */
                       int val=mono[j]*32767.f+drand48()-0.5f;
 #endif



More information about the commits mailing list