[Bug 29359] DSOUND_BufPtrDiff: Assertion `ptr1 < buflen' failed.
wine-bugs at winehq.org
wine-bugs at winehq.org
Tue Dec 27 08:09:24 CST 2011
http://bugs.winehq.org/show_bug.cgi?id=29359
--- Comment #11 from Andrew Eikum <aeikum at codeweavers.com> 2011-12-27 08:09:24 CST ---
This is caused by bad buffer wrap-around logic. This little diff should fix it.
We're working on other changes to dsound, so I'll see what happens with those
changes before pushing this one out.
diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index e61c93d..62c1b9e 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -573,8 +573,7 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl
*dsb, DWORD writepos, DWO
/* increase mix position */
dsb->primary_mixpos += len;
- if (dsb->primary_mixpos >= dsb->device->buflen)
- dsb->primary_mixpos -= dsb->device->buflen;
+ dsb->primary_mixpos %= dsb->device->buflen;
return len;
}
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list