[PATCH 4/5] dsound: fixup DSOUND_WaveQueue checks

Maarten Lankhorst m.b.lankhorst at gmail.com
Wed Jan 2 07:46:46 CST 2013


If you're going to be silly, you should go all the way. :P
---
 dlls/dsound/mixer.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c
index 3c5492b..f9a5e8f 100644
--- a/dlls/dsound/mixer.c
+++ b/dlls/dsound/mixer.c
@@ -580,16 +580,18 @@ static void DSOUND_WaveQueue(DirectSoundDevice *device, LPBYTE pos, DWORD bytes)
 	hr = IAudioRenderClient_GetBuffer(device->render, bytes / device->pwfx->nBlockAlign, &buffer);
 	if(FAILED(hr)){
 		WARN("GetBuffer failed: %08x\n", hr);
-		goto done;
+		return;
 	}
 
 	memcpy(buffer, pos, bytes);
 
 	hr = IAudioRenderClient_ReleaseBuffer(device->render, bytes / device->pwfx->nBlockAlign, 0);
-	if(FAILED(hr))
-		WARN("ReleaseBuffer failed: %08x\n", hr);
+	if(FAILED(hr)) {
+		ERR("ReleaseBuffer failed: %08x\n", hr);
+		IAudioRenderClient_ReleaseBuffer(device->render, 0, 0);
+		return;
+	}
 
-done:
 	device->pad += bytes;
 }
 
-- 
1.8.0.3




More information about the wine-patches mailing list