[xiph-commits] r16778 - trunk/ao/src

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Wed Jan 13 13:14:39 PST 2010


Author: xiphmont
Date: 2010-01-13 13:14:39 -0800 (Wed, 13 Jan 2010)
New Revision: 16778

Modified:
   trunk/ao/src/ao_wmm.c
Log:
Apply patch to correct block align calculation in ao_wmm.c; fixes #1279



Modified: trunk/ao/src/ao_wmm.c
===================================================================
--- trunk/ao/src/ao_wmm.c	2010-01-11 20:38:38 UTC (rev 16777)
+++ trunk/ao/src/ao_wmm.c	2010-01-13 21:14:39 UTC (rev 16778)
@@ -496,7 +496,7 @@
   wavefmt.nChannels       = format->channels;
   wavefmt.wBitsPerSample  = format->bits;
   wavefmt.nSamplesPerSec  = format->rate;
-  wavefmt.nBlockAlign     = (wavefmt.wBitsPerSample>>3)*wavefmt.nChannels;
+  wavefmt.nBlockAlign     = ((wavefmt.wBitsPerSample+7)>>3)*wavefmt.nChannels;
   wavefmt.nAvgBytesPerSec = wavefmt.nSamplesPerSec*wavefmt.nBlockAlign;
   wavefmt.cbSize          = 0;
   internal->wavefmt       = wavefmt;



More information about the commits mailing list