From 55efce6c9ca7fd13f4e4362f7fc8fd456d803ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20H=C3=B6hle?= Date: Wed, 21 Sep 2011 10:42:16 +0200 Subject: [PATCH] wineoss: EAGAIN (OSS buffer full) is a regular situation. --- dlls/wineoss.drv/mmdevdrv.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c index 562a67498fb..33438e4954c 100644 --- a/dlls/wineoss.drv/mmdevdrv.c +++ b/dlls/wineoss.drv/mmdevdrv.c @@ -1224,6 +1224,7 @@ static void oss_write_data(ACImpl *This) written = write(This->fd, buf, to_write * This->fmt->nBlockAlign); if(written < 0){ + /* EAGAIN is OSS buffer full, log that too */ WARN("write failed: %d (%s)\n", errno, strerror(errno)); return; } @@ -1729,9 +1730,12 @@ static HRESULT WINAPI AudioRenderClient_ReleaseBuffer( w_bytes = write(This->fd, buffer, written_frames * This->fmt->nBlockAlign); if(w_bytes < 0){ - LeaveCriticalSection(&This->lock); - WARN("write failed: %d (%s)\n", errno, strerror(errno)); - return E_FAIL; + if(errno != EAGAIN){ + LeaveCriticalSection(&This->lock); + WARN("write failed: %d (%s)\n", errno, strerror(errno)); + return E_FAIL; + }else /* OSS buffer full */ + w_bytes = 0; } w_frames = w_bytes / This->fmt->nBlockAlign; This->inbuf_frames += w_frames;