pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

wip/pcaudiolib: remove wrong use of water marks



Module Name:	pkgsrc-wip
Committed By:	adr <adr%sdf.org@localhost>
Pushed By:	adr
Date:		Thu Feb 1 11:39:31 2024 +0000
Changeset:	dcb44e71f613fa3484941c988be58beeea7810ef

Modified Files:
	pcaudiolib/distinfo
	pcaudiolib/patches/patch-src_netbsd.c

Log Message:
wip/pcaudiolib: remove wrong use of water marks

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dcb44e71f613fa3484941c988be58beeea7810ef

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 pcaudiolib/distinfo                   |  2 +-
 pcaudiolib/patches/patch-src_netbsd.c | 11 +++--------
 2 files changed, 4 insertions(+), 9 deletions(-)

diffs:
diff --git a/pcaudiolib/distinfo b/pcaudiolib/distinfo
index 33aed79e49..48a6da5ffa 100644
--- a/pcaudiolib/distinfo
+++ b/pcaudiolib/distinfo
@@ -7,4 +7,4 @@ SHA1 (patch-Makefile.am) = 98b94b9187db8c10980081fb2db54f4305734a71
 SHA1 (patch-configure.ac) = f5cfa55793b644572ccb3d26ae82d2699204e894
 SHA1 (patch-src_audio.c) = c249bf6b0efe3f6b9a6166b3ab7857314d73e297
 SHA1 (patch-src_audio__priv.h) = d38ff94692362e8e801c9a7f671b8ac46bdf8b21
-SHA1 (patch-src_netbsd.c) = 3dd7341aedbb8da43ab93436cd6522a0d162af83
+SHA1 (patch-src_netbsd.c) = 96ff1f35bbcee8107b33166a4daad902c9a1e1b9
diff --git a/pcaudiolib/patches/patch-src_netbsd.c b/pcaudiolib/patches/patch-src_netbsd.c
index 56007dfe01..a8b68edd5c 100644
--- a/pcaudiolib/patches/patch-src_netbsd.c
+++ b/pcaudiolib/patches/patch-src_netbsd.c
@@ -2,9 +2,9 @@ $NetBSD$
 
 Add NetBSD native audio support
 
---- src/netbsd.c.orig	2024-01-30 01:47:27.652017641 +0000
+--- src/netbsd.c.orig	2024-01-30 02:16:50.046541412 +0000
 +++ src/netbsd.c
-@@ -0,0 +1,198 @@
+@@ -0,0 +1,193 @@
 +/* Netbsd Output.
 + *
 + * Based on Oss Output by Reece H. Dunn
@@ -103,18 +103,13 @@ Add NetBSD native audio support
 +	audio_info_t audioinfo;
 +	if ((self->fd = open(self->device ? self->device : "/dev/audio", O_WRONLY, 0)) == -1)
 +		return errno;
-+	if (ioctl(self->fd, AUDIO_GETINFO, &audioinfo) == -1)
-+		goto error;
++	AUDIO_INITINFO(&audioinfo);
 +	audioinfo.play.sample_rate = rate;
 +	audioinfo.play.channels = channels;
 +	audioinfo.play.precision = aformat_netbsd_tbl[i].netbsd_precision;
 +	audioinfo.play.encoding = aformat_netbsd_tbl[i].netbsd_format;
-+	/* Use the high and low water marks to achieve the desired latency (LATENCY is in ms) */
-+	audioinfo.hiwat = (rate * channels * audioinfo.play.precision * LATENCY) / (1000 * audioinfo.blocksize);
-+	audioinfo.lowat = (audioinfo.hiwat * 70) / 100;
 +	if (ioctl(self->fd, AUDIO_SETINFO, &audioinfo) == -1)
 +		goto error;
-+	ioctl(self->fd, AUDIO_GETINFO, &audioinfo);
 +	return 0;
 +error:
 +	close(self->fd);


Home | Main Index | Thread Index | Old Index