=?UTF-8?Q?J=C3=B6rg=20H=C3=B6hle=20?=: winealsa: Reset accounts for dropped frames in capture mode.

Alexandre Julliard julliard at winehq.org
Thu Jan 12 13:19:23 CST 2012


Module: wine
Branch: master
Commit: be90732e5e9658882a4b0d19d5eaac7f473dd03f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=be90732e5e9658882a4b0d19d5eaac7f473dd03f

Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date:   Wed Jan 11 23:13:23 2012 +0100

winealsa: Reset accounts for dropped frames in capture mode.

---

 dlls/winealsa.drv/mmdevdrv.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index 55035bd..e791feb 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);




More information about the wine-cvs mailing list