[PATCH 2/2] wineoss.drv: Don't use SNDCTL_DSP_GETISPACE

Andrew Eikum aeikum at codeweavers.com
Wed Dec 17 09:28:21 CST 2014


This shouldn't be needed as the device is opened in non-blocking mode,
and it appears this function is unimplemented on PCBSD.

---

This should fix bug 33940.

 dlls/wineoss.drv/mmdevdrv.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index 23f8dd8..178fb32 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -1493,20 +1493,11 @@ static void oss_write_data(ACImpl *This)
 static void oss_read_data(ACImpl *This)
 {
     UINT64 pos, readable;
-    audio_buf_info bi;
     ssize_t nread;
 
-    if(ioctl(This->fd, SNDCTL_DSP_GETISPACE, &bi) < 0){
-        WARN("GETISPACE failed: %d (%s)\n", errno, strerror(errno));
-        return;
-    }
-
     pos = (This->held_frames + This->lcl_offs_frames) % This->bufsize_frames;
     readable = (This->bufsize_frames - pos) * This->fmt->nBlockAlign;
 
-    if(bi.bytes < readable)
-        readable = bi.bytes;
-
     nread = read(This->fd, This->local_buffer + pos * This->fmt->nBlockAlign,
             readable);
     if(nread < 0){
-- 
2.1.3




More information about the wine-patches mailing list