[PATCH 2/2] dsound: Use correct buffer wraparound logic
Andrew Eikum
aeikum at codeweavers.com
Mon Jan 16 21:22:55 CST 2012
Actually, don't commit this one.
On Mon, Jan 16, 2012 at 02:02:49PM -0600, Andrew Eikum wrote:
> ---
> dlls/dsound/mixer.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
> index 23af6ce..b35a888 100644
> --- a/dlls/dsound/mixer.c
> +++ b/dlls/dsound/mixer.c
> @@ -539,8 +539,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;
> }
>
>
More information about the wine-devel
mailing list