diff src/modplug/fastmix.cxx @ 1044:b1128efde471 trunk

[svn] - get rid of all warnings gcc 4.2.0 emits with my build configuration. - fix for minor bugs.
author yaz
date Sun, 20 May 2007 12:05:48 -0700
parents 6b5a52635b3b
children 032053ca08ab 3673c7ec4ea2
line wrap: on
line diff
--- a/src/modplug/fastmix.cxx	Fri May 18 10:42:29 2007 -0700
+++ b/src/modplug/fastmix.cxx	Sun May 20 12:05:48 2007 -0700
@@ -1874,8 +1874,11 @@
 		else if (n > vumax)
 			vumax = n;
 		p = n >> (8-MIXING_ATTENUATION) ; // 24-bit signed
-		buf[i*3]   = p & 0xFF0000 ;
-		buf[i*3+1] = p & 0x00FF00 ;
+//		buf[i*3]   = p & 0xFF0000 ; //XXX
+//		buf[i*3+1] = p & 0x00FF00 ;
+//		buf[i*3+2] = p & 0x0000FF ;
+		buf[i*3]   = (p & 0xFF0000) >> 16 ;
+		buf[i*3+1] = (p & 0x00FF00) >> 8 ;
 		buf[i*3+2] = p & 0x0000FF ;
 	}
 	*lpMin = vumin;