Mercurial > audlegacy
comparison Plugins/Input/modplug/modplugbmp.cpp @ 701:d539e5c5f730 trunk
[svn] Fixes of the remaining GCC 4.1 warnings from external contributor Diego "Flameeyes" Petteno (Gentoo).
| author | chainsaw |
|---|---|
| date | Sun, 26 Feb 2006 13:08:35 -0800 |
| parents | 7fa1738514d5 |
| children | 073d2f46a490 |
comparison
equal
deleted
inserted
replaced
| 700:99382cddf771 | 701:d539e5c5f730 |
|---|---|
| 218 if(mModProps.mBits == 16) | 218 if(mModProps.mBits == 16) |
| 219 { | 219 { |
| 220 uint n = mBufSize >> 1; | 220 uint n = mBufSize >> 1; |
| 221 for(uint i = 0; i < n; i++) { | 221 for(uint i = 0; i < n; i++) { |
| 222 short old = ((short*)mBuffer)[i]; | 222 short old = ((short*)mBuffer)[i]; |
| 223 ((short*)mBuffer)[i] *= mPreampFactor; | 223 ((short*)mBuffer)[i] *= (short int)mPreampFactor; |
| 224 // detect overflow and clip! | 224 // detect overflow and clip! |
| 225 if ((old & 0x8000) != | 225 if ((old & 0x8000) != |
| 226 (((short*)mBuffer)[i] & 0x8000)) | 226 (((short*)mBuffer)[i] & 0x8000)) |
| 227 ((short*)mBuffer)[i] = old | 0x7FFF; | 227 ((short*)mBuffer)[i] = old | 0x7FFF; |
| 228 | 228 |
| 230 } | 230 } |
| 231 else | 231 else |
| 232 { | 232 { |
| 233 for(uint i = 0; i < mBufSize; i++) { | 233 for(uint i = 0; i < mBufSize; i++) { |
| 234 uchar old = ((uchar*)mBuffer)[i]; | 234 uchar old = ((uchar*)mBuffer)[i]; |
| 235 ((uchar*)mBuffer)[i] *= mPreampFactor; | 235 ((uchar*)mBuffer)[i] *= (short int)mPreampFactor; |
| 236 // detect overflow and clip! | 236 // detect overflow and clip! |
| 237 if ((old & 0x80) != | 237 if ((old & 0x80) != |
| 238 (((uchar*)mBuffer)[i] & 0x80)) | 238 (((uchar*)mBuffer)[i] & 0x80)) |
| 239 ((uchar*)mBuffer)[i] = old | 0x7F; | 239 ((uchar*)mBuffer)[i] = old | 0x7F; |
| 240 } | 240 } |
