pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/audio/portaudio portaudio: Fix playing very short file...
details: https://anonhg.NetBSD.org/pkgsrc/rev/4f0462ec2cd5
branches: trunk
changeset: 458113:4f0462ec2cd5
user: nia <nia%pkgsrc.org@localhost>
date: Thu Sep 09 21:41:59 2021 +0000
description:
portaudio: Fix playing very short files in Audacity with Sun backend
According to portaudio's own docs, my previous code was correct -
aborting the stream should cause any queued samples to be dropped.
However, audacity seems to be abusing the portaudio API and calling
Abort immediately once it's finished processing the output...
diffstat:
audio/portaudio/Makefile | 4 +-
audio/portaudio/distinfo | 4 +-
audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c | 25 +---------
3 files changed, 8 insertions(+), 25 deletions(-)
diffs (80 lines):
diff -r 58cec053e175 -r 4f0462ec2cd5 audio/portaudio/Makefile
--- a/audio/portaudio/Makefile Thu Sep 09 21:10:18 2021 +0000
+++ b/audio/portaudio/Makefile Thu Sep 09 21:41:59 2021 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.33 2021/09/08 21:04:57 nia Exp $
+# $NetBSD: Makefile,v 1.34 2021/09/09 21:41:59 nia Exp $
DISTNAME= pa_stable_v190600_20161030
PKGNAME= ${DISTNAME:S/^pa_stable_v/portaudio-/1:S/_/./g}
-PKGREVISION= 8
+PKGREVISION= 9
CATEGORIES= audio
MASTER_SITES= http://www.portaudio.com/archives/
EXTRACT_SUFX= .tgz
diff -r 58cec053e175 -r 4f0462ec2cd5 audio/portaudio/distinfo
--- a/audio/portaudio/distinfo Thu Sep 09 21:10:18 2021 +0000
+++ b/audio/portaudio/distinfo Thu Sep 09 21:41:59 2021 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.25 2021/01/16 21:06:52 reinoud Exp $
+$NetBSD: distinfo,v 1.26 2021/09/09 21:41:59 nia Exp $
SHA1 (pa_stable_v190600_20161030.tgz) = 56c596bba820d90df7d057d8f6a0ec6bf9ab82e8
RMD160 (pa_stable_v190600_20161030.tgz) = e6e5cd3f3cb7469aa17549c189e445d573567e13
@@ -14,5 +14,5 @@
SHA1 (patch-src_common_pa__stream.h) = 94781a9ae79ea1340eea8caadc106416c019cf74
SHA1 (patch-src_hostapi_alsa_pa__linux__alsa.c) = 71daf913422f72aa379ae8cc302186800cff7717
SHA1 (patch-src_hostapi_oss_pa__unix__oss.c) = 572c48f64104e22e7ae49acc54a26e549e381b5b
-SHA1 (patch-src_hostapi_sun_pa__unix__sun.c) = 0a2d26e477bb4c45d56b8d70db5a939911f4cf64
+SHA1 (patch-src_hostapi_sun_pa__unix__sun.c) = bab9b21d35d76afafa06c929bb35954d3870bc0d
SHA1 (patch-src_os_unix_pa__unix__hostapis.c) = 8cfc7d7aac8f9803e204711ded3d64842913f4fd
diff -r 58cec053e175 -r 4f0462ec2cd5 audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c
--- a/audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c Thu Sep 09 21:10:18 2021 +0000
+++ b/audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c Thu Sep 09 21:41:59 2021 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_hostapi_sun_pa__unix__sun.c,v 1.3 2021/01/16 21:06:52 reinoud Exp $
+$NetBSD: patch-src_hostapi_sun_pa__unix__sun.c,v 1.4 2021/09/09 21:42:00 nia Exp $
Sun/NetBSD audio support.
---- src/hostapi/sun/pa_unix_sun.c.orig 2021-01-16 19:57:35.080979704 +0000
+--- src/hostapi/sun/pa_unix_sun.c.orig 2021-09-09 21:10:47.132269006 +0000
+++ src/hostapi/sun/pa_unix_sun.c
-@@ -0,0 +1,1140 @@
+@@ -0,0 +1,1123 @@
+/*
+ * $Id"
+ * PortAudio Portable Real-Time Audio Library
@@ -100,11 +100,6 @@
+#define SUN_DEV_DEFAULT "/dev/audio"
+#endif
+
-+#ifndef AUDIO_FLUSH
-+#include <sys/stropts.h>
-+#define AUDIO_FLUSH I_FLUSH
-+#endif
-+
+#ifndef AUDIO_ENCODING_SLINEAR
+#define AUDIO_ENCODING_SLINEAR AUDIO_ENCODING_LINEAR
+#endif
@@ -919,19 +914,7 @@
+
+static PaError AbortStream( PaStream *s )
+{
-+ PaError result = paNoError;
-+ PaSunStream *stream = (PaSunStream*)s;
-+
-+ stream->stopped = true;
-+
-+ if( stream->bufferProcessor.streamCallback )
-+ PA_ENSURE( PaUtil_CancelThreading( &stream->threading, 0, NULL ) );
-+
-+ if( stream->play.fd != -1 )
-+ (void)ioctl(stream->play.fd, AUDIO_FLUSH);
-+
-+error:
-+ return result;
++ StopStream(s);
+}
+
+static PaError IsStreamStopped( PaStream *s )
Home |
Main Index |
Thread Index |
Old Index