Commit 5577cc73 authored by Alex Villacís Lasso's avatar Alex Villacís Lasso Committed by Alexandre Julliard

Correction to earlier assertion patch to allow for buf_mixpos ==

buflen in non-looping case, fixes looping of one-off mixed samples introduced by previous patch.
parent b1722b7a
......@@ -490,8 +490,10 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, DWORD writepos, DWO
dsb->buf_mixpos %= dsb->buflen;
if (dsb->leadin && (dsb->startpos <= dsb->buf_mixpos))
dsb->leadin = FALSE; /* HACK: see above */
} else if (dsb->buf_mixpos > dsb->buflen) {
ERR("Mixpos (%lu) past buflen (%lu), capping...\n", dsb->buf_mixpos, dsb->buflen);
dsb->buf_mixpos = dsb->buflen;
}
else dsb->buf_mixpos = 0; /* %= dsb->buflen; */
}
return 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