diff --git a/multimedia/dsound.c b/multimedia/dsound.c index e8d18ad9de..50301d4a37 100644 --- a/multimedia/dsound.c +++ b/multimedia/dsound.c @@ -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; }