pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio/portaudio



Module Name:    pkgsrc
Committed By:   nia
Date:           Thu Sep  9 21:42:00 UTC 2021

Modified Files:
        pkgsrc/audio/portaudio: Makefile distinfo
        pkgsrc/audio/portaudio/patches: patch-src_hostapi_sun_pa__unix__sun.c

Log Message:
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...


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 pkgsrc/audio/portaudio/Makefile
cvs rdiff -u -r1.25 -r1.26 pkgsrc/audio/portaudio/distinfo
cvs rdiff -u -r1.3 -r1.4 \
    pkgsrc/audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c

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

Modified files:

Index: pkgsrc/audio/portaudio/Makefile
diff -u pkgsrc/audio/portaudio/Makefile:1.33 pkgsrc/audio/portaudio/Makefile:1.34
--- pkgsrc/audio/portaudio/Makefile:1.33        Wed Sep  8 21:04:57 2021
+++ pkgsrc/audio/portaudio/Makefile     Thu Sep  9 21:41:59 2021
@@ -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

Index: pkgsrc/audio/portaudio/distinfo
diff -u pkgsrc/audio/portaudio/distinfo:1.25 pkgsrc/audio/portaudio/distinfo:1.26
--- pkgsrc/audio/portaudio/distinfo:1.25        Sat Jan 16 21:06:52 2021
+++ pkgsrc/audio/portaudio/distinfo     Thu Sep  9 21:41:59 2021
@@ -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.c) = 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

Index: pkgsrc/audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c
diff -u pkgsrc/audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c:1.3 pkgsrc/audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c:1.4
--- pkgsrc/audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c:1.3    Sat Jan 16 21:06:52 2021
+++ pkgsrc/audio/portaudio/patches/patch-src_hostapi_sun_pa__unix__sun.c        Thu Sep  9 21:42:00 2021
@@ -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 @@ Sun/NetBSD audio support.
 +#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 @@ Sun/NetBSD audio support.
 +
 +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