winecoreaudio: Fix AudioRenderClient Get/ReleaseBuffer protocol (resend)

Joerg-Cyril.Hoehle at Joerg-Cyril.Hoehle at
Wed Sep 7 06:31:11 CDT 2011


[unmodified & sent alone. There's no apply failure in testbot.]

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 mode]
>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
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 become "getbuf_last=*frames" once I finalize the correct ordering
for capture mode (the frames==0 case is 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