From 03ad9366f1ada4fbda6adeb44cc64b0e61413d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20H=C3=B6hle?= Date: Tue, 20 Sep 2011 15:03:52 +0200 Subject: [PATCH] mmdevapi: Fix stuttering upon start and underrun. --- dlls/winealsa.drv/mmdevdrv.c | 3 ++- dlls/wineoss.drv/mmdevdrv.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index c77b54e88ad..15146f59476 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -2107,7 +2107,8 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer( alsa_wrap_buffer(This, This->tmp_buffer + written * This->fmt->nBlockAlign, written_frames - written); - + else + This->lcl_offs_frames += written; This->held_frames = written_frames - written; } } diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index 629f4f762c7..562a67498fb 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -1740,7 +1740,8 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer( if(This->buf_state == LOCKED_WRAPPED) oss_wrap_buffer(This, This->tmp_buffer + w_bytes, written_frames - w_frames); - + else + This->lcl_offs_frames += w_frames; This->held_frames = written_frames - w_frames; } }