[Bug 42546] DSOUND_PrimaryOpen() incorrect set buf size

wine-bugs at winehq.org wine-bugs at winehq.org
Wed Mar 1 04:42:21 CST 2017


https://bugs.winehq.org/show_bug.cgi?id=42546

--- Comment #12 from Huw Davies <huw at codeweavers.com> ---
(In reply to Ivan_83 from comment #11)

> But mixer module need more checks.
> I m move up check in DSOUND_PerformMix()
> 	if (maxq > device->buflen)
> 		maxq = device->buflen;
> and then make a test: set
>             new_buflen = sizeof(float) * (max(aclen, (3 * fraglen)) /
> wfx->nBlockAlign);
> and got small noises and crash on exit.

The problem with this is that maxq corresponds to bytes
in the audio client buffer, while buflen is bytes in the
float buffer, so you're not comparing like with like.

I've sent in four patches which tidy this up by using
frame counts.  The final one of them fixes an issue with
the initial assignment of maxq (now called 'frames').

-- 
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