From be90732e5e9658882a4b0d19d5eaac7f473dd03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20H=C3=B6hle?= Date: Wed, 11 Jan 2012 23:13:23 +0100 Subject: [PATCH] winealsa: Reset accounts for dropped frames in capture mode. --- dlls/winealsa.drv/mmdevdrv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 55035bd851d..e791feba1eb 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -1776,9 +1776,13 @@ static HRESULT WINAPI AudioClient_Reset(IAudioClient *iface) if(snd_pcm_prepare(This->pcm_handle) < 0) WARN("snd_pcm_prepare failed\n"); - This->last_pos_frames = 0; + if(This->dataflow == eRender){ + This->written_frames = 0; + This->last_pos_frames = 0; + }else{ + This->written_frames += This->held_frames; + } This->held_frames = 0; - This->written_frames = 0; This->lcl_offs_frames = 0; LeaveCriticalSection(&This->lock);