Commit 4d713f97 authored by Ove Kaaven's avatar Ove Kaaven Committed by Alexandre Julliard

Sounds were cut off due to integer overflow. Fixed.

parent 43c1efde
......@@ -1799,9 +1799,9 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBuffer *dsb)
len = DSOUND_FRAGLEN; /* The most we will use */
if (!(dsb->playflags & DSBPLAY_LOOPING)) {
temp = ((primarybuf->wfx.nAvgBytesPerSec * dsb->buflen) /
temp = MulDiv32(primarybuf->wfx.nAvgBytesPerSec, dsb->buflen,
dsb->nAvgBytesPerSec) -
((primarybuf->wfx.nAvgBytesPerSec * dsb->playpos) /
MulDiv32(primarybuf->wfx.nAvgBytesPerSec, dsb->playpos,
dsb->nAvgBytesPerSec);
len = (len > temp) ? temp : len;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment