winecoreaudio: Fix AudioRenderClient Get/ReleaseBuffer protocol.

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Tue Aug 30 05:19:59 CDT 2011


[unmodified except rebased. It's a pity it's not in 1.3.27.]

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).

[...capture] I believe that ReleaseBuffer(0) always returns S_OK, like in the render case.
Verified indeed. But I've not finalized capture code yet (I'm not very familiar with capture, so it takes more time).

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: 0001-winecoreaudio-Fix-AudioRenderClient-Get-ReleaseBuffe.patch
Type: application/octet-stream
Size: 3983 bytes
Desc: 0001-winecoreaudio-Fix-AudioRenderClient-Get-ReleaseBuffe.patch
URL: <>

More information about the wine-patches mailing list