[PATCH 26/29] dsound: Fix capture

Maarten Lankhorst m.b.lankhorst at gmail.com
Sat Apr 9 05:16:02 CDT 2011


---
 dlls/dsound/capture.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dlls/dsound/capture.c b/dlls/dsound/capture.c
index a4eab8d..bf388bd 100644
--- a/dlls/dsound/capture.c
+++ b/dlls/dsound/capture.c
@@ -233,6 +233,7 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetCurrentPosition(IDirectSo
 {
     IDirectSoundCaptureBufferImpl *This = impl_from_IDirectSoundCaptureBuffer8(iface);
     DWORD pos1, pos2;
+    TRACE("(%p)->(%p, %p)\n", This, cappos, readpos);
     EnterCriticalSection(&This->parent->crst);
     pos1 = This->pos;
     if (This->playing)
@@ -249,6 +250,11 @@ static HRESULT WINAPI IDirectSoundCaptureBufferImpl_GetCurrentPosition(IDirectSo
         pos2 = pos1;
     pos2 %= This->buf_size;
     LeaveCriticalSection(&This->parent->crst);
+    TRACE("Reporting %u %u\n", pos1, pos2);
+    if (readpos)
+        *readpos = pos1;
+    if (cappos)
+        *cappos = pos2;
     return S_OK;
 }
 
@@ -608,6 +614,7 @@ static HRESULT WINAPI IDirectSoundNotifyImpl_SetNotificationPositions(IDirectSou
             if (notifications[i].dwOffset >= This->buf_size
                 && notifications[i].dwOffset != DSCBPN_OFFSET_STOP)
                 goto out;
+            TRACE("ofs: %u/%x with event %p\n", notifications[i].dwOffset, notifications[i].dwOffset, notifications[i].hEventNotify);
         }
         hr = E_OUTOFMEMORY;
         nots = HeapAlloc(GetProcessHeap(), 0, count*sizeof(*nots));
-- 
1.7.4.1


--------------070905050208030802080007--



More information about the wine-patches mailing list