NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/51999 pulseaudio broken
The following reply was made to PR kern/51999; it has been noted by GNATS.
From: Nathanial Sloss <nat%netbsd.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/51999 pulseaudio broken
Date: Thu, 23 Mar 2017 21:55:59 +1100
With this patch to liboss playback and recording with pulseaudio work.
--- src/lib/libossaudio/ossaudio.c 2017-02-11 05:16:31.000000000 +1100
+++ /home/netbsd/ossaudio.c 2017-03-23 21:51:14.000000000 +1100
@@ -411,11 +411,11 @@ audio_ioctl(int fd, unsigned long com, v
return retval;
setblocksize(fd, &tmpinfo);
bufinfo.fragsize = tmpinfo.blocksize;
- bufinfo.fragments = tmpinfo.hiwat - (tmpinfo.play.seek
- + tmpinfo.blocksize - 1) / tmpinfo.blocksize;
+ bufinfo.fragments = (tmpinfo.hiwat * tmpinfo.blocksize - (
+ tmpinfo.play.seek + tmpinfo.blocksize -1)) /
+ tmpinfo.blocksize;
bufinfo.fragstotal = tmpinfo.hiwat;
- bufinfo.bytes = tmpinfo.hiwat * tmpinfo.blocksize
- - tmpinfo.play.seek;
+ bufinfo.bytes = bufinfo.fragments * tmpinfo.blocksize;
*(struct audio_buf_info *)argp = bufinfo;
break;
case SNDCTL_DSP_GETISPACE:
@@ -424,11 +424,10 @@ audio_ioctl(int fd, unsigned long com, v
return retval;
setblocksize(fd, &tmpinfo);
bufinfo.fragsize = tmpinfo.blocksize;
- bufinfo.fragments = tmpinfo.hiwat - (tmpinfo.record.seek +
- tmpinfo.blocksize - 1) / tmpinfo.blocksize;
+ bufinfo.fragments = (tmpinfo.record.seek)
+ / tmpinfo.blocksize;
bufinfo.fragstotal = tmpinfo.hiwat;
- bufinfo.bytes = tmpinfo.hiwat * tmpinfo.blocksize
- - tmpinfo.record.seek;
+ bufinfo.bytes = bufinfo.fragments * tmpinfo.blocksize;
*(struct audio_buf_info *)argp = bufinfo;
break;
case SNDCTL_DSP_NONBLOCK:
Best regards,
Nat
Home |
Main Index |
Thread Index |
Old Index