DSOUND: prevent assertion in mixer.c
felix.nawothnig at t-online.de
Tue Aug 2 13:43:05 CDT 2005
Alex Villacís Lasso wrote:
> wine-pthread: mixer.c:386: DSOUND_MixInBuffer: Assertion
> `adjusted_remainder >= 0' failed.
> wine: Unhandled exception (thread 000a), starting debugger...
> WineDbg starting on pid 0x8
I guess this is preluded by some "length not a multiple of block size"
errors? I've been experiencing those errors with the same failed
assertion in another game and came up with a similar patch but didn't
submit since I think this just hides another bug as it should *not*
happen that buf_mixpos becomes greater than buflen (and this >= above
should probably be ==) at any time.
IMHO you should at least add an ERR to that branch.
> --- wine-20050725-cvs/dlls/dsound/mixer.c 2005-06-21 04:43:29.000000000 -0500
> +++ wine-20050725-cvs-patch/dlls/dsound/mixer.c 2005-08-01 02:16:42.000000000 -0500
> @@ -491,6 +491,7 @@
> if (dsb->leadin && (dsb->startpos <= dsb->buf_mixpos))
> dsb->leadin = FALSE; /* HACK: see above */
> + else dsb->buf_mixpos = 0; /* %= dsb->buflen; */
And shouldn't it be "%= dsb->buflen;"? I'd think that this causes
looping until new stuff is mixed in...
More information about the wine-devel