comparison Plugins/Input/adplug/core/rix.cpp @ 625:0a73d1faeb4e trunk

[svn] GCC 4.1 warning fixes by Diego 'Flameeyes' Petteno from Gentoo.
author chainsaw
date Mon, 06 Feb 2006 17:10:47 -0800
parents 15ca2ea93a30
children 2b06eb5e472d
comparison
equal deleted inserted replaced
624:a4ab65713d46 625:0a73d1faeb4e
197 res = strm_and_fr(v); 197 res = strm_and_fr(v);
198 low = res; 198 low = res;
199 buffer[index*12] = (low+4)>>3; 199 buffer[index*12] = (low+4)>>3;
200 for(i=1;i<=11;i++) 200 for(i=1;i<=11;i++)
201 { 201 {
202 res *= 1.06; 202 res = (unsigned int)((double)res * 1.06);
203 buffer[index*12+i] = res>>3; 203 buffer[index*12+i] = res>>3;
204 } 204 }
205 } 205 }
206 206
207 /*----------------------------------------------------------*/ 207 /*----------------------------------------------------------*/
233 { 233 {
234 if(sustain <= 0 && mutex == 0) 234 if(sustain <= 0 && mutex == 0)
235 { 235 {
236 mutex++; 236 mutex++;
237 band_sus = rix_proc(); 237 band_sus = rix_proc();
238 if(band_sus) sustain += band_sus * 1.06; 238 if(band_sus) sustain += (int)((double)band_sus * 1.06);
239 mstotal+=sustain; 239 mstotal+=sustain;
240 dro[T++]=(sustain>=0x100?1:0); 240 dro[T++]=(sustain>=0x100?1:0);
241 dro[T++]=sustain&0xff; 241 dro[T++]=sustain&0xff;
242 if(sustain>=0x100) 242 if(sustain>=0x100)
243 dro[T++]=(sustain>>8)&0xff; 243 dro[T++]=(sustain>>8)&0xff;
502 switch_ad_bd(i); 502 switch_ad_bd(i);
503 } 503 }
504 /*----------------------------------------------------------------------*/ 504 /*----------------------------------------------------------------------*/
505 inline unsigned int CrixPlayer::strm_and_fr(unsigned short parm) 505 inline unsigned int CrixPlayer::strm_and_fr(unsigned short parm)
506 { 506 {
507 return ((unsigned int)parm*6+10000)*0.27461678223; 507 return (int)(((unsigned int)parm*6+10000)*0.27461678223);
508 } 508 }
509 509