Commit 50cdc6d7 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

wineoss.drv: Don't use SNDCTL_DSP_GETISPACE.

This shouldn't be needed as the device is opened in non-blocking mode, and it appears this function is unimplemented on PCBSD.
parent d301254e
...@@ -1493,20 +1493,11 @@ static void oss_write_data(ACImpl *This) ...@@ -1493,20 +1493,11 @@ static void oss_write_data(ACImpl *This)
static void oss_read_data(ACImpl *This) static void oss_read_data(ACImpl *This)
{ {
UINT64 pos, readable; UINT64 pos, readable;
audio_buf_info bi;
ssize_t nread; 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; pos = (This->held_frames + This->lcl_offs_frames) % This->bufsize_frames;
readable = (This->bufsize_frames - pos) * This->fmt->nBlockAlign; 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, nread = read(This->fd, This->local_buffer + pos * This->fmt->nBlockAlign,
readable); readable);
if(nread < 0){ if(nread < 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment