winecoreaudio: Fix AudioRenderClient Get/ReleaseBuffer protocol.

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Mon Aug 8 09:13:13 CDT 2011


With this patch, MacOS will be the first to correctly implement the allowed ordering of Get and ReleaseBuffer according to my rendering tests (see bug #27937).

Somebody else with access to an mmdevapi capture device (testbot has none) should do the same for AudioCaptureClient.  E.g. I believe that ReleaseBuffer(0) always returns S_OK, like in the render case.

Because my patch changes the type of getbuf_last, I had to slightly modify AudioCaptureClient already:
@@ -1781,7 +1797,7 @@ static HRESULT WINAPI AudioCaptureClient_GetBuffer(IAudioCaptureClient *iface,
     *flags = 0;
     This->written_frames += *frames;
     This->inbuf_frames -= *frames;
-    This->getbuf_last = TRUE;
+    This->getbuf_last = 1;

This will likely become "getbuf_last=*frames" once somebody implements said correct ordering for capture mode (presumably the frames==0 case will be handled a few lines above that).

	Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-winecoreaudio-Fix-AudioRenderClient-Get-ReleaseBuffe.patch
Type: application/octet-stream
Size: 3981 bytes
Desc: 0002-winecoreaudio-Fix-AudioRenderClient-Get-ReleaseBuffe.patch
URL: <>

More information about the wine-patches mailing list