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.
This commit is contained in:
parent
b1722b7ad7
commit
5577cc739d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue