dsound capture release while capturing bug fix

Robert Reif reif at earthlink.net
Sun Aug 15 21:14:21 CDT 2004


Allow proper release while capturing.
-------------- next part --------------
Index: dlls/dsound/capture.c
===================================================================
RCS file: /home/wine/wine/dlls/dsound/capture.c,v
retrieving revision 1.26
diff -u -r1.26 capture.c
--- dlls/dsound/capture.c	12 Aug 2004 23:00:58 -0000	1.26
+++ dlls/dsound/capture.c	16 Aug 2004 02:10:45 -0000
@@ -418,15 +418,15 @@
 
     if ( uRef == 0 ) {
         TRACE("deleting object\n");
+        if (This->capture_buffer)
+            IDirectSoundCaptureBufferImpl_Release(
+		(LPDIRECTSOUNDCAPTUREBUFFER8) This->capture_buffer);
+
         if (This->driver) { 
             IDsCaptureDriver_Close(This->driver);
             IDsCaptureDriver_Release(This->driver);
 	}
 
-        if (This->capture_buffer)
-            IDirectSoundCaptureBufferImpl_Release(
-		(LPDIRECTSOUNDCAPTUREBUFFER8) This->capture_buffer);
-
 	if (This->pwfx)
 	    HeapFree(GetProcessHeap(), 0, This->pwfx);
 
@@ -1012,6 +1012,9 @@
 
     if ( uRef == 0 ) {
         TRACE("deleting object\n");
+	if (This->dsound->state == STATE_CAPTURING)
+	    This->dsound->state = STATE_STOPPING;
+
         if (This->pdscbd)
             HeapFree(GetProcessHeap(),0, This->pdscbd);
 


More information about the wine-patches mailing list