[PATCH RFC 5/5] dsound: convert from fixed to floating point
Alexander E. Patrakov
patrakov at gmail.com
Sat Dec 24 23:21:29 CST 2011
"Alexander E. Patrakov" <patrakov at gmail.com> wrote:
> Andrew Eikum converted the buffer position calculation code from fixed
> point to floating point, because floating-point code is more readable.
> I agree with him.
>
> I am not sending further patches out, because it is not yet clear
> which of the two proposed patchsets for bug 14717 will be the final
> one. Anyway, both of the approaches depend on all the patches that I
> sent today.
>
Please ignore this patch for now, it has at least one bug.
- freqAcc += adj;
- adv = (freqAcc >> DSOUND_FREQSHIFT);
- freqAcc &= (1 << DSOUND_FREQSHIFT) - 1;
- ipos += adv * istride;
+ freqAcc += dsb->freqAdjust;
+ ipos += ((DWORD)freqAcc) * istride;
+ freqAcc -= truncf(freqAcc);
The last line of this hunk is wrong, should be "=", not "-=".
--
Alexander E. Patrakov
More information about the wine-devel
mailing list