applied Trac #1548
authorMonty <xiphmont@xiph.org>
Wed, 8 Jul 2009 06:24:49 +0000 (06:24 +0000)
committerMonty <xiphmont@xiph.org>
Wed, 8 Jul 2009 06:24:49 +0000 (06:24 +0000)
svn path=/trunk/vorbis/; revision=16224

examples/decoder_example.c

index 5fc3487..b360fdd 100644 (file)
@@ -248,7 +248,7 @@ int main(){
                     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