fixed integer overflow for large sounds
svn-id: r3458
This commit is contained in:
parent
e2f1fef1f9
commit
65fc6958d7
2 changed files with 10 additions and 2 deletions
|
@ -17,6 +17,9 @@
|
|||
*
|
||||
* Change Log:
|
||||
* $Log$
|
||||
* Revision 1.11 2001/11/06 07:47:00 strigeus
|
||||
* fixed integer overflow for large sounds
|
||||
*
|
||||
* Revision 1.10 2001/11/05 20:44:34 strigeus
|
||||
* speech support
|
||||
*
|
||||
|
@ -873,7 +876,7 @@ void playSfxSound(void *sound, uint32 size, uint rate) {
|
|||
_sfx_pos = 0;
|
||||
_sfx_fp_speed = (1<<16) * rate / 22050;
|
||||
_sfx_fp_pos = 0;
|
||||
debug(1, "size=%d, rate=%d", size, rate);
|
||||
while (size&0xFFFF0000) size>>=1, rate>>=1;
|
||||
_sfx_size = size * 22050 / rate;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue