Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] audacity: update to 3.5.1. Update audacity and deps
@ 2024-04-26 17:50 iFoundSilentHouse
  2024-04-26 18:08 ` [PR PATCH] [Updated] [WIP] " iFoundSilentHouse
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: iFoundSilentHouse @ 2024-04-26 17:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]

There is a new pull request by iFoundSilentHouse against master on the void-packages repository

https://github.com/iFoundSilentHouse/void-packages audacity-3.5
https://github.com/void-linux/void-packages/pull/50047

audacity: update to 3.5.1. Update audacity and deps
- I tested the changes in this PR: **YES**
- I built this PR locally for my native architecture, (x86_64-glibc)

Lilv dyn-manifest change: https://github.com/lv2/lilv/commit/17f6705ae6d0e8c7202f598f5271786a00a065be
Portaudio patches: https://github.com/PortAudio/portaudio/commit/45c12e8d18ae4434000ed1521e49d9b5ef91dedf
 new audacity works fine without `audacity-compat.patch`


A patch file from https://github.com/void-linux/void-packages/pull/50047.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-audacity-3.5-50047.patch --]
[-- Type: text/x-diff, Size: 46481 bytes --]

From 9dab9a6908feae52bf2e000a555a1ffb61819b97 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 19:11:47 +0600
Subject: [PATCH 1/7] audacity: update to 3.5.1.

---
 srcpkgs/audacity/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template
index 7b838119ab2611..27f17c0ec22eb0 100644
--- a/srcpkgs/audacity/template
+++ b/srcpkgs/audacity/template
@@ -1,6 +1,6 @@
 # Template file for 'audacity'
 pkgname=audacity
-version=3.4.2
+version=3.5.1
 revision=1
 build_style=cmake
 build_helper="cmake-wxWidgets-gtk3 qemu"
@@ -25,7 +25,7 @@ license="GPL-2.0-or-later, GPL-3.0-or-later, CC-BY-3.0"
 homepage="https://www.audacityteam.org"
 changelog="https://github.com/audacity/audacity/raw/master/CHANGELOG.txt"
 distfiles="https://github.com/audacity/audacity/releases/download/Audacity-${version}/audacity-sources-${version}.tar.gz"
-checksum=f28dd718d2c5a2aa9f207b8351443a90c1f02b65378ca94bcc7febda42635e48
+checksum=8786a1be8d63f4793fc3f2a5f1f61c441e0a4b9a7ed9137d59277ad5f72bd512
 
 CXXFLAGS="-D_FILE_OFFSET_BITS=64"
 

From 2231d6eb631da49cce3416e103b4fe7a47e65231 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:06 +0600
Subject: [PATCH 2/7] lilv: update to 0.24.24.

---
 srcpkgs/lilv/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/lilv/template b/srcpkgs/lilv/template
index 57f4bc30b9501b..bf03429f42c1e9 100644
--- a/srcpkgs/lilv/template
+++ b/srcpkgs/lilv/template
@@ -1,18 +1,18 @@
 # Template file for 'lilv'
 pkgname=lilv
-version=0.24.12
-revision=4
-build_style=waf3
-configure_args="--dyn-manifest"
+version=0.24.24
+revision=1
+build_style=meson
 hostmakedepends="pkg-config"
 makedepends="python3-devel serd-devel sord-devel sratom-devel libsndfile-devel
  lv2"
 short_desc="Simple yet powerful C API for using LV2 plugins"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="ISC"
-homepage="http://drobilla.net/software/lilv/"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=26a37790890c9c1f838203b47f5b2320334fe92c02a4d26ebbe2669dbd769061
+homepage="https://drobilla.net/software/lilv.html"
+changelog="https://raw.githubusercontent.com/lv2/lilv/master/NEWS"
+distfiles="https://download.drobilla.net/lilv-${version}.tar.xz"
+checksum=6bb6be9f88504176d0642f12de809b2b9e2dc55621a68adb8c7edb99aefabb4f
 
 post_install() {
 	vlicense COPYING
@@ -31,7 +31,8 @@ lilv-bash-completion_package() {
 	depends="bash-completion lilv"
 	short_desc+=" - Bash completion for Lilv"
 	pkg_install() {
-		vcompletion utils/lilv.bash_completion bash
+		vcompletion ${DESTDIR}/etc/bash_completion.d/lilv bash
+		rm -r ${DESTDIR}/etc
 	}
 }
 

From 3036e7e4a6aafb84ee642a28710edb390fe673d1 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:14 +0600
Subject: [PATCH 3/7] portaudio: update to 190700.20210406.

---
 .../portaudio/patches/audacity-compat.patch   | 344 -------
 srcpkgs/portaudio/patches/sndio.patch         | 883 ------------------
 srcpkgs/portaudio/template                    |  10 +-
 3 files changed, 5 insertions(+), 1232 deletions(-)
 delete mode 100644 srcpkgs/portaudio/patches/audacity-compat.patch
 delete mode 100644 srcpkgs/portaudio/patches/sndio.patch

diff --git a/srcpkgs/portaudio/patches/audacity-compat.patch b/srcpkgs/portaudio/patches/audacity-compat.patch
deleted file mode 100644
index eb89f0a6346db2..00000000000000
--- a/srcpkgs/portaudio/patches/audacity-compat.patch
+++ /dev/null
@@ -1,344 +0,0 @@
-Source: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/portaudio-audacity-compat.patch
-Upstream: No
-Reason: Audacity needs Pa_GetStreamHostApiType to use system wide portaudio
-
-
-diff --git a/configure.in b/configure.in
-index 13816fb..83c239a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -420,6 +420,7 @@ case "${host_os}" in
-                    DLL_LIBS="$DLL_LIBS -lossaudio"
-                    LIBS="$LIBS -lossaudio"
-            fi
-+           INCLUDES="$INCLUDES pa_unix_oss.h"
-            AC_DEFINE(PA_USE_OSS,1)
-         fi
- 
-diff --git a/include/pa_unix_oss.h b/include/pa_unix_oss.h
-new file mode 100644
-index 0000000..64e04cb
---- /dev/null
-+++ b/include/pa_unix_oss.h
-@@ -0,0 +1,104 @@
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-diff --git a/include/pa_win_ds.h b/include/pa_win_ds.h
-index 5d38641..ba1c245 100644
---- a/include/pa_win_ds.h
-+++ b/include/pa_win_ds.h
-@@ -86,6 +86,21 @@ typedef struct PaWinDirectSoundStreamInfo{
- 
- }PaWinDirectSoundStreamInfo;
- 
-+/** Retrieve the GUID of the input device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
-+
-+/** Retrieve the GUID of the output device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
- 
- 
- #ifdef __cplusplus
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 8a94aaf..9c8a295 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -1197,6 +1197,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* stream );
- signed long Pa_GetStreamWriteAvailable( PaStream* stream );
- 
- 
-+/** Retrieve the host type handling an open stream.
-+
-+ @return Returns a non-negative value representing the host API type
-+ handling an open stream or, a PaErrorCode (which are always negative)
-+ if PortAudio is not initialized or an error is encountered.
-+*/
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
-+
-+
- /* Miscellaneous utilities */
- 
- 
-diff --git a/src/common/pa_front.c b/src/common/pa_front.c
-index 188cee9..52f44a6 100644
---- a/src/common/pa_front.c
-+++ b/src/common/pa_front.c
-@@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream,
-                                   hostApiInputParametersPtr, hostApiOutputParametersPtr,
-                                   sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
- 
--    if( result == paNoError )
-+    if( result == paNoError ) {
-         AddOpenStream( *stream );
-+        PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
-+    }
- 
- 
-     PA_LOGAPI(("Pa_OpenStream returned:\n" ));
-@@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream )
-     return result;
- }
- 
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
-+{
-+    PaError error = PaUtil_ValidateStreamPointer( stream );
-+    PaHostApiTypeId result;
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
-+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
-+#endif
-+
-+    if( error == paNoError )
-+    {
-+        result = PA_STREAM_REP(stream)->hostApiType;
-+    }
-+    else
-+    {
-+        result = (PaHostApiTypeId) error;
-+    }
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
-+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
-+#endif
-+
-+    return result;
-+}
- 
- PaError Pa_GetSampleSize( PaSampleFormat format )
- {
-diff --git a/src/common/pa_stream.c b/src/common/pa_stream.c
-index 03a0ee6..c4376f9 100644
---- a/src/common/pa_stream.c
-+++ b/src/common/pa_stream.c
-@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe
-     streamRepresentation->streamInfo.inputLatency = 0.;
-     streamRepresentation->streamInfo.outputLatency = 0.;
-     streamRepresentation->streamInfo.sampleRate = 0.;
-+
-+    streamRepresentation->hostApiType = 0;
- }
- 
- 
-diff --git a/src/common/pa_stream.h b/src/common/pa_stream.h
-index 678e2ad..70572c7 100644
---- a/src/common/pa_stream.h
-+++ b/src/common/pa_stream.h
-@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation {
-     PaStreamFinishedCallback *streamFinishedCallback;
-     void *userData;
-     PaStreamInfo streamInfo;
-+    PaHostApiTypeId hostApiType;
- } PaUtilStreamRepresentation;
- 
- 
-diff --git a/src/hostapi/alsa/pa_linux_alsa.c b/src/hostapi/alsa/pa_linux_alsa.c
-index 584cde8..558fb3d 100644
---- a/src/hostapi/alsa/pa_linux_alsa.c
-+++ b/src/hostapi/alsa/pa_linux_alsa.c
-@@ -621,6 +621,7 @@ typedef struct
-     StreamDirection streamDir;
- 
-     snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */
-+    int card;
- } PaAlsaStreamComponent;
- 
- /* Implementation specific stream structure */
-@@ -1873,6 +1874,7 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
- {
-     PaError result = paNoError;
-     PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError;
-+    snd_pcm_info_t* pcmInfo;
-     assert( params->channelCount > 0 );
- 
-     /* Make sure things have an initial value */
-@@ -1900,6 +1902,9 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
-     self->device = params->device;
- 
-     PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) );
-+
-+    snd_pcm_info_alloca( &pcmInfo );
-+    self->card = snd_pcm_info_get_card( pcmInfo );
-     self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm );
- 
-     PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) );
-@@ -4605,9 +4610,7 @@ PaError PaAlsa_GetStreamInputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->capture.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->capture.card;
- 
- error:
-     return result;
-@@ -4624,9 +4627,7 @@ PaError PaAlsa_GetStreamOutputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->playback.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->playback.card;
- 
- error:
-     return result;
-diff --git a/src/hostapi/coreaudio/pa_mac_core_blocking.c b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-index 679c6ba..a69e085 100644
---- a/src/hostapi/coreaudio/pa_mac_core_blocking.c
-+++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-@@ -66,6 +66,9 @@
- #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
- # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
- # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
-+#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
-+# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
-+# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
- #else
- # include <libkern/OSAtomic.h>
- #endif
-diff --git a/src/hostapi/oss/pa_unix_oss.c b/src/hostapi/oss/pa_unix_oss.c
-index 51e9630..f257d80 100644
---- a/src/hostapi/oss/pa_unix_oss.c
-+++ b/src/hostapi/oss/pa_unix_oss.c
-@@ -2043,3 +2043,26 @@ error:
- #endif
- }
- 
-+const char *PaOSS_GetStreamInputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->capture )
-+    {
-+      return stream->capture->devName;
-+    }
-+
-+   return NULL;
-+}
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->playback )
-+    {
-+      return stream->playback->devName;
-+    }
-+
-+   return NULL;
-+}
diff --git a/srcpkgs/portaudio/patches/sndio.patch b/srcpkgs/portaudio/patches/sndio.patch
deleted file mode 100644
index 9fc20960d58622..00000000000000
--- a/srcpkgs/portaudio/patches/sndio.patch
+++ /dev/null
@@ -1,883 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 5e1a764..2747f73 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -44,7 +44,7 @@ PALIB = libportaudio.la
- PAINC = include/portaudio.h
- 
- PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \
--	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \
-+	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS|PaSndio)_.*" \
- 	     -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
- 
- COMMON_OBJS = \
-@@ -146,6 +146,7 @@ SRC_DIRS = \
- 	src/hostapi/dsound \
- 	src/hostapi/jack \
- 	src/hostapi/oss \
-+	src/hostapi/sndio \
- 	src/hostapi/wasapi \
- 	src/hostapi/wdmks \
- 	src/hostapi/wmme \
-diff --git a/configure.in b/configure.in
-index 83c239a..db11d65 100644
---- a/configure.in
-+++ b/configure.in
-@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
-             AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
-             [with_alsa=$withval])
- 
-+AC_ARG_WITH(sndio,
-+            AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
-+            [with_sndio=$withval])
-+
- AC_ARG_WITH(jack,
-             AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
-             [with_jack=$withval])
-@@ -120,6 +124,10 @@ have_alsa=no
- if test "x$with_alsa" != "xno"; then
-     AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
- fi
-+have_sndio=no
-+if test "x$with_sndio" != "xno"; then
-+    AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
-+fi
- have_asihpi=no
- if test "x$with_asihpi" != "xno"; then
-     AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
-@@ -406,6 +414,13 @@ case "${host_os}" in
-            AC_DEFINE(PA_USE_ALSA,1)
-         fi
- 
-+        if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
-+            DLL_LIBS="$DLL_LIBS -lsndio"
-+            LIBS="$LIBS -lsndio"
-+            OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
-+            AC_DEFINE(PA_USE_SNDIO,1)
-+        fi
-+
-         if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
-            DLL_LIBS="$DLL_LIBS $JACK_LIBS"
-            CFLAGS="$CFLAGS $JACK_CFLAGS"
-@@ -510,6 +525,7 @@ case "$target_os" in
-         ;;
-      *)
- 	AC_MSG_RESULT([
-+  Sndio ....................... $have_sndio
-   OSS ......................... $have_oss
-   JACK ........................ $have_jack
- ])
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 9c8a295..e535a02 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
-     paWDMKS=11,
-     paJACK=12,
-     paWASAPI=13,
--    paAudioScienceHPI=14
-+    paAudioScienceHPI=14,
-+    paSndio=15
- } PaHostApiTypeId;
- 
- 
-diff --git a/src/hostapi/sndio/pa_sndio.c b/src/hostapi/sndio/pa_sndio.c
-new file mode 100644
-index 0000000..725ef47
---- /dev/null
-+++ b/src/hostapi/sndio/pa_sndio.c
-@@ -0,0 +1,768 @@
-+/*
-+ * Copyright (c) 2009 Alexandre Ratchov <alex@caoua.org>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+#include <sys/types.h>
-+#include <pthread.h>
-+#include <poll.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <sndio.h>
-+
-+#include "pa_util.h"
-+#include "pa_hostapi.h"
-+#include "pa_stream.h"
-+#include "pa_process.h"
-+#include "pa_allocation.h"
-+
-+#if 0
-+#define DPR(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
-+#else
-+#define DPR(...) do {} while (0)
-+#endif
-+
-+/*
-+ * per-stream data
-+ */
-+typedef struct PaSndioStream
-+{
-+	PaUtilStreamRepresentation base;
-+	PaUtilBufferProcessor bufproc;	/* format conversion */
-+	struct sio_hdl *hdl;		/* handle for device i/o */
-+	struct sio_par par;		/* current device parameters */	
-+	unsigned mode;			/* SIO_PLAY, SIO_REC or both */
-+	int stopped;			/* stop requested or not started */
-+	int active;			/* thread is running */
-+	unsigned long long realpos;	/* frame number h/w is processing */
-+	char *rbuf, *wbuf;		/* bounce buffers for conversions */
-+	unsigned long long rpos, wpos;	/* bytes read/written */
-+	pthread_t thread;		/* thread of the callback interface */
-+} PaSndioStream;
-+
-+/*
-+ * api "class" data, common to all streams
-+ */
-+typedef struct PaSndioHostApiRepresentation
-+{
-+	PaUtilHostApiRepresentation base;
-+	PaUtilStreamInterface callback;
-+	PaUtilStreamInterface blocking;
-+	/*
-+	 * sndio has no device discovery mechanism and PortAudio has
-+	 * no way of accepting raw device strings from users.
-+	 * Normally we just expose the default device, which can be
-+	 * changed via the AUDIODEVICE environment variable, but we
-+	 * also allow specifying a list of up to 16 devices via the
-+	 * PA_SNDIO_AUDIODEVICES environment variable.
-+	 *
-+	 * Example:
-+	 * PA_SNDIO_AUDIODEVICES=default:snd/0.monitor:snd@remote/0
-+	 */
-+#define PA_SNDIO_AUDIODEVICES_MAX	16
-+	PaDeviceInfo device_info[PA_SNDIO_AUDIODEVICES_MAX];
-+	PaDeviceInfo *infos[PA_SNDIO_AUDIODEVICES_MAX];
-+	char *audiodevices;
-+} PaSndioHostApiRepresentation;
-+
-+/*
-+ * callback invoked when blocks are processed by the hardware
-+ */
-+static void
-+sndioOnMove(void *addr, int delta)
-+{
-+	PaSndioStream *s = (PaSndioStream *)addr;
-+
-+	s->realpos += delta;
-+}
-+
-+/*
-+ * convert PA encoding to sndio encoding, return true on success
-+ */
-+static int
-+sndioSetFmt(struct sio_par *sio, PaSampleFormat fmt)
-+{
-+	switch (fmt & ~paNonInterleaved) {
-+	case paInt32:
-+		sio->sig = 1;
-+		sio->bits = 32;
-+		break;
-+	case paInt24:
-+		sio->sig = 1;
-+		sio->bits = 24;
-+		sio->bps = 3;	/* paInt24 is packed format */
-+		break;
-+	case paInt16:
-+	case paFloat32:
-+		sio->sig = 1;
-+		sio->bits = 16;
-+		break;
-+	case paInt8:
-+		sio->sig = 1;
-+		sio->bits = 8;
-+		break;
-+	case paUInt8:
-+		sio->sig = 0;
-+		sio->bits = 8;
-+		break;
-+	default:
-+		DPR("sndioSetFmt: %x: unsupported\n", fmt);
-+		return 0;
-+	}
-+	sio->le = SIO_LE_NATIVE;
-+	return 1;
-+}
-+
-+/*
-+ * convert sndio encoding to PA encoding, return true on success
-+ */
-+static int
-+sndioGetFmt(struct sio_par *sio, PaSampleFormat *fmt)
-+{
-+	if ((sio->bps * 8 != sio->bits && !sio->msb) ||
-+	    (sio->bps > 1 && sio->le != SIO_LE_NATIVE)) {
-+		DPR("sndioGetFmt: bits = %u, le = %u, msb = %u, bps = %u\n",
-+		    sio->bits, sio->le, sio->msb, sio->bps);
-+		return 0;
-+	}
-+
-+	switch (sio->bits) {
-+	case 32:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt32;
-+		break;
-+	case 24:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = (sio->bps == 3) ? paInt24 : paInt32;
-+		break;
-+	case 16:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt16;
-+		break;
-+	case 8:
-+		*fmt = sio->sig ? paInt8 : paUInt8;
-+		break;
-+	default:
-+		DPR("sndioGetFmt: %u: unsupported\n", sio->bits);
-+		return 0;
-+	}
-+	return 1;
-+}
-+
-+/*
-+ * I/O loop for callback interface
-+ */
-+static void *
-+sndioThread(void *arg)
-+{
-+	PaSndioStream *s = (PaSndioStream *)arg;
-+	PaStreamCallbackTimeInfo ti;
-+	unsigned char *data;
-+	unsigned todo, rblksz, wblksz;
-+	int n, result;
-+	
-+	rblksz = s->par.round * s->par.rchan * s->par.bps;
-+	wblksz = s->par.round * s->par.pchan * s->par.bps;
-+	
-+	DPR("sndioThread: mode = %x, round = %u, rblksz = %u, wblksz = %u\n",
-+	    s->mode, s->par.round, rblksz, wblksz);
-+	
-+	while (!s->stopped) {
-+		if (s->mode & SIO_REC) {
-+			todo = rblksz;
-+			data = s->rbuf;
-+			while (todo > 0) {
-+				n = sio_read(s->hdl, data, todo);
-+				if (n == 0) {
-+					DPR("sndioThread: sio_read failed\n");
-+					goto failed;
-+				}
-+				todo -= n;
-+				data += n;
-+			}
-+			s->rpos += s->par.round;
-+			ti.inputBufferAdcTime = 
-+			    (double)s->realpos / s->par.rate;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			ti.outputBufferDacTime =
-+			    (double)(s->realpos + s->par.bufsz) / s->par.rate;
-+		}
-+		ti.currentTime = s->realpos / (double)s->par.rate;
-+		PaUtil_BeginBufferProcessing(&s->bufproc, &ti, 0);
-+		if (s->mode & SIO_PLAY) {
-+			PaUtil_SetOutputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedOutputChannels(&s->bufproc,
-+			    0, s->wbuf, s->par.pchan);
-+		}
-+		if (s->mode & SIO_REC) {
-+			PaUtil_SetInputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedInputChannels(&s->bufproc,
-+			    0, s->rbuf, s->par.rchan);
-+		}
-+		result = paContinue;
-+		n = PaUtil_EndBufferProcessing(&s->bufproc, &result);
-+		if (n != s->par.round) {
-+			DPR("sndioThread: %d < %u frames, result = %d\n",
-+			    n, s->par.round, result);
-+		}
-+		if (result != paContinue) {
-+			break;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			n = sio_write(s->hdl, s->wbuf, wblksz);
-+			if (n < wblksz) {
-+				DPR("sndioThread: sio_write failed\n");
-+				goto failed;
-+			}
-+			s->wpos += s->par.round;
-+		}
-+	}
-+ failed:
-+	s->active = 0;
-+	DPR("sndioThread: done\n");
-+}
-+
-+static PaError
-+OpenStream(struct PaUtilHostApiRepresentation *hostApi,
-+    PaStream **stream,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate,
-+    unsigned long framesPerBuffer,
-+    PaStreamFlags streamFlags,
-+    PaStreamCallback *streamCallback,
-+    void *userData)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	PaSndioStream *s;
-+	PaError err;
-+	struct sio_hdl *hdl;
-+	struct sio_par par;
-+	unsigned mode;
-+	int inch, onch;
-+	PaSampleFormat ifmt, ofmt, siofmt;
-+	const char *dev;
-+
-+	DPR("OpenStream:\n");
-+
-+	mode = 0;
-+	inch = onch = 0;
-+	ifmt = ofmt = 0;
-+	sio_initpar(&par);
-+
-+	if (outputPar && outputPar->channelCount > 0) {
-+		if (outputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad output device\n", outputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (outputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: output specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, outputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ofmt = outputPar->sampleFormat;
-+		onch = par.pchan = outputPar->channelCount;
-+		mode |= SIO_PLAY;
-+	}
-+	if (inputPar && inputPar->channelCount > 0) {
-+		if (inputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad input device\n", inputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (inputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: input specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, inputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ifmt = inputPar->sampleFormat;
-+		inch = par.rchan = inputPar->channelCount;
-+		mode |= SIO_REC;
-+	}
-+	par.rate = sampleRate;
-+	if (framesPerBuffer != paFramesPerBufferUnspecified)
-+		par.round = framesPerBuffer;
-+
-+	DPR("OpenStream: mode = %x, trying rate = %u\n", mode, par.rate);
-+
-+	if (outputPar) {
-+		dev = sndioHostApi->device_info[outputPar->device].name;
-+	} else if (inputPar) {
-+		dev = sndioHostApi->device_info[inputPar->device].name;
-+	} else {
-+		return paUnanticipatedHostError;
-+	}
-+	hdl = sio_open(dev, mode, 0);
-+	if (hdl == NULL)
-+		return paUnanticipatedHostError;
-+	if (!sio_setpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sio_getpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sndioGetFmt(&par, &siofmt)) {
-+		sio_close(hdl);
-+		return paSampleFormatNotSupported;
-+	}
-+	if ((mode & SIO_REC) && par.rchan != inputPar->channelCount) {
-+		DPR("OpenStream: rchan(%u) != %d\n", par.rchan, inputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((mode & SIO_PLAY) && par.pchan != outputPar->channelCount) {
-+		DPR("OpenStream: pchan(%u) != %d\n", par.pchan, outputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((double)par.rate < sampleRate * 0.995 ||
-+	    (double)par.rate > sampleRate * 1.005) {
-+		DPR("OpenStream: rate(%u) != %g\n", par.rate, sampleRate);
-+		sio_close(hdl);
-+		return paInvalidSampleRate;
-+	}
-+	
-+	s = (PaSndioStream *)PaUtil_AllocateMemory(sizeof(PaSndioStream));
-+	if (s == NULL) {
-+		sio_close(hdl);
-+		return paInsufficientMemory;
-+	}
-+	PaUtil_InitializeStreamRepresentation(&s->base, 
-+	    streamCallback ? &sndioHostApi->callback : &sndioHostApi->blocking,
-+	    streamCallback, userData);
-+	DPR("inch = %d, onch = %d, ifmt = %x, ofmt = %x\n", 
-+	    inch, onch, ifmt, ofmt);
-+	err = PaUtil_InitializeBufferProcessor(&s->bufproc,
-+	    inch, ifmt, siofmt,
-+	    onch, ofmt, siofmt,
-+	    sampleRate,
-+	    streamFlags,
-+	    framesPerBuffer,
-+	    par.round,
-+	    paUtilFixedHostBufferSize, 
-+	    streamCallback, userData);
-+	if (err) {
-+		DPR("OpenStream: PaUtil_InitializeBufferProcessor failed\n");
-+		PaUtil_FreeMemory(s);
-+		sio_close(hdl);
-+		return err;
-+	}
-+	if (mode & SIO_REC) {
-+		s->rbuf = malloc(par.round * par.rchan * par.bps);
-+		if (s->rbuf == NULL) {
-+			DPR("OpenStream: failed to allocate rbuf\n");
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}
-+	if (mode & SIO_PLAY) {
-+		s->wbuf = malloc(par.round * par.pchan * par.bps);
-+		if (s->wbuf == NULL) {
-+			DPR("OpenStream: failed to allocate wbuf\n");
-+			free(s->rbuf);
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}	
-+	s->base.streamInfo.inputLatency = 0;
-+	s->base.streamInfo.outputLatency = (mode & SIO_PLAY) ?
-+	    (double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatencyFrames(&s->bufproc)) / (double)par.rate : 0;
-+	s->base.streamInfo.sampleRate = par.rate;
-+	s->active = 0;
-+	s->stopped = 1;
-+	s->mode = mode;
-+	s->hdl = hdl;
-+	s->par = par;
-+	*stream = s;	
-+	DPR("OpenStream: done\n");
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingReadStream(PaStream *stream, void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res, todo;
-+	void *buf;
-+	
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		buf = s->rbuf;
-+		todo = n * s->par.rchan * s->par.bps;
-+		while (todo > 0) {
-+			res = sio_read(s->hdl, buf, todo);
-+			if (res == 0)
-+				return paUnanticipatedHostError;
-+			buf = (char *)buf + res;
-+			todo -= res;
-+		}
-+		s->rpos += n;
-+		PaUtil_SetInputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedInputChannels(&s->bufproc, 0, s->rbuf, s->par.rchan);
-+		res = PaUtil_CopyInput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingReadStream: copyInput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingWriteStream(PaStream* stream, const void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res;
-+
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		PaUtil_SetOutputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedOutputChannels(&s->bufproc, 0, s->wbuf, s->par.pchan);
-+		res = PaUtil_CopyOutput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingWriteStream: copyOutput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		res = sio_write(s->hdl, s->wbuf, n * s->par.pchan * s->par.bps);
-+		if (res == 0)
-+			return paUnanticipatedHostError;		
-+		s->wpos += n;
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static signed long
-+BlockingGetStreamReadAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLIN);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLIN))
-+		return 0;
-+
-+	return s->realpos - s->rpos;
-+}
-+
-+static signed long
-+BlockingGetStreamWriteAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLOUT);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLOUT))
-+		return 0;
-+
-+	return s->par.bufsz - (s->wpos - s->realpos);
-+}
-+
-+static PaError
-+BlockingWaitEmpty( PaStream *stream )
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	/*
-+	 * drain playback buffers; sndio always does it in background
-+	 * and there is no way to wait for completion
-+	 */
-+	DPR("BlockingWaitEmpty: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return paNoError;
-+}
-+
-+static PaError
-+StartStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned primes, wblksz;
-+	int err;
-+
-+	DPR("StartStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (!s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 0;
-+	s->active = 1;
-+	s->realpos = 0;
-+	s->wpos = 0;
-+	s->rpos = 0;
-+	PaUtil_ResetBufferProcessor(&s->bufproc);
-+	if (!sio_start(s->hdl))
-+		return paUnanticipatedHostError;
-+
-+	/*
-+	 * send a complete buffer of silence
-+	 */
-+	if (s->mode & SIO_PLAY) {
-+		wblksz = s->par.round * s->par.pchan * s->par.bps;
-+		memset(s->wbuf, 0, wblksz);
-+		for (primes = s->par.bufsz / s->par.round; primes > 0; primes--)
-+			s->wpos += sio_write(s->hdl, s->wbuf, wblksz);
-+	}
-+	if (s->base.streamCallback) {
-+		err = pthread_create(&s->thread, NULL, sndioThread, s);
-+		if (err) {
-+			DPR("SndioStartStream: couldn't create thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+		DPR("StartStream: started...\n");
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+StopStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	void *ret;
-+	int err;
-+
-+	DPR("StopStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 1;
-+	if (s->base.streamCallback) {
-+		err = pthread_join(s->thread, &ret);
-+		if (err) {
-+			DPR("SndioStop: couldn't join thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+	}
-+	if (!sio_stop(s->hdl))
-+		return paUnanticipatedHostError;
-+	return paNoError;
-+}
-+
-+static PaError
-+CloseStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	DPR("CloseStream:\n");
-+
-+	if (!s->stopped)
-+		StopStream(stream);
-+
-+	if (s->mode & SIO_REC)
-+		free(s->rbuf);
-+	if (s->mode & SIO_PLAY)
-+		free(s->wbuf);
-+	sio_close(s->hdl);
-+        PaUtil_TerminateStreamRepresentation(&s->base);
-+	PaUtil_TerminateBufferProcessor(&s->bufproc);
-+	PaUtil_FreeMemory(s);
-+	return paNoError;
-+}
-+
-+static PaError
-+AbortStream(PaStream *stream)
-+{
-+	DPR("AbortStream:\n");
-+
-+	return StopStream(stream);
-+}
-+
-+static PaError
-+IsStreamStopped(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamStopped: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->stopped;
-+}
-+
-+static PaError
-+IsStreamActive(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamActive: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->active;
-+}
-+
-+static PaTime
-+GetStreamTime(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	return (double)s->realpos / s->base.streamInfo.sampleRate;
-+}
-+
-+static PaError
-+IsFormatSupported(struct PaUtilHostApiRepresentation *hostApi,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate)
-+{
-+	return paFormatIsSupported;
-+}
-+
-+static void
-+Terminate(struct PaUtilHostApiRepresentation *hostApi)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	free(sndioHostApi->audiodevices);
-+	PaUtil_FreeMemory(hostApi);
-+}
-+
-+static void
-+InitDeviceInfo(PaDeviceInfo *info, PaHostApiIndex hostApiIndex, const char *name)
-+{
-+	info->structVersion = 2;
-+	info->name = name;
-+	info->hostApi = hostApiIndex;
-+	info->maxInputChannels = 128;
-+	info->maxOutputChannels = 128;
-+	info->defaultLowInputLatency = 0.01;
-+	info->defaultLowOutputLatency = 0.01;
-+	info->defaultHighInputLatency = 0.5;
-+	info->defaultHighOutputLatency = 0.5;
-+	info->defaultSampleRate = 48000;
-+}
-+
-+PaError
-+PaSndio_Initialize(PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	PaDeviceInfo *info;
-+	struct sio_hdl *hdl;
-+	char *audiodevices;
-+	char *device;
-+	size_t deviceCount;
-+
-+	DPR("PaSndio_Initialize: initializing...\n");
-+
-+	if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) == NULL)
-+		return paNoError;
-+	sio_close(hdl);
-+	/* unusable APIs should return paNoError and a NULL hostApi */
-+	*hostApi = NULL;
-+
-+	sndioHostApi = PaUtil_AllocateMemory(sizeof(PaSndioHostApiRepresentation));
-+	if (sndioHostApi == NULL)
-+		return paNoError;
-+
-+	// Add default device
-+	info = &sndioHostApi->device_info[0];
-+	InitDeviceInfo(info, hostApiIndex, SIO_DEVANY);
-+	sndioHostApi->infos[0] = info;
-+	deviceCount = 1;
-+
-+	// Add additional devices as specified in the PA_SNDIO_AUDIODEVICES
-+	// environment variable as a colon separated list
-+	sndioHostApi->audiodevices = NULL;
-+	audiodevices = getenv("PA_SNDIO_AUDIODEVICES");
-+	if (audiodevices != NULL) {
-+		sndioHostApi->audiodevices = strdup(audiodevices);
-+		if (sndioHostApi->audiodevices == NULL)
-+			return paNoError;
-+
-+		audiodevices = sndioHostApi->audiodevices;
-+		while ((device = strsep(&audiodevices, ":")) != NULL &&
-+			deviceCount < PA_SNDIO_AUDIODEVICES_MAX) {
-+			if (*device == '\0')
-+				continue;
-+			info = &sndioHostApi->device_info[deviceCount];
-+			InitDeviceInfo(info, hostApiIndex, device);
-+			sndioHostApi->infos[deviceCount] = info;
-+			deviceCount++;
-+		}
-+	}
-+
-+	*hostApi = &sndioHostApi->base;
-+	(*hostApi)->info.structVersion = 1;
-+	(*hostApi)->info.type = paSndio;
-+	(*hostApi)->info.name = "sndio";
-+	(*hostApi)->info.deviceCount = deviceCount;
-+	(*hostApi)->info.defaultInputDevice = 0;
-+	(*hostApi)->info.defaultOutputDevice = 0;
-+	(*hostApi)->deviceInfos = sndioHostApi->infos;
-+	(*hostApi)->Terminate = Terminate;
-+	(*hostApi)->OpenStream = OpenStream;
-+	(*hostApi)->IsFormatSupported = IsFormatSupported;
-+	
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->blocking,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    BlockingReadStream,
-+	    BlockingWriteStream,
-+	    BlockingGetStreamReadAvailable,
-+	    BlockingGetStreamWriteAvailable);
-+
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->callback,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    PaUtil_DummyRead,
-+	    PaUtil_DummyWrite,
-+	    PaUtil_DummyGetReadAvailable,
-+	    PaUtil_DummyGetWriteAvailable);
-+
-+	DPR("PaSndio_Initialize: done\n");
-+	return paNoError;
-+}
-diff --git a/src/os/unix/pa_unix_hostapis.c b/src/os/unix/pa_unix_hostapis.c
-index a9b4a05..f10ced1 100644
---- a/src/os/unix/pa_unix_hostapis.c
-+++ b/src/os/unix/pa_unix_hostapis.c
-@@ -44,6 +44,7 @@
- 
- PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-+PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- /* Added for IRIX, Pieter, oct 2, 2003: */
- PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-@@ -57,6 +58,10 @@ PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiI
- 
- PaUtilHostApiInitializer *paHostApiInitializers[] =
-     {
-+#ifdef PA_USE_SNDIO
-+	    PaSndio_Initialize,
-+#endif
-+
- #ifdef __linux__
- 
- #if PA_USE_ALSA
--- 
-2.27.0
-
diff --git a/srcpkgs/portaudio/template b/srcpkgs/portaudio/template
index 54dcd9a7215504..bb815dfc6f40a4 100644
--- a/srcpkgs/portaudio/template
+++ b/srcpkgs/portaudio/template
@@ -1,7 +1,7 @@
 # Template file for 'portaudio'
 pkgname=portaudio
-version=190600.20161030
-revision=6
+version=190700.20210406
+revision=1
 build_style=gnu-configure
 configure_args="--enable-cxx --with-jack $(vopt_enable sndio)"
 hostmakedepends="pkg-config"
@@ -9,9 +9,9 @@ makedepends="alsa-lib-devel jack-devel $(vopt_if sndio sndio-devel)"
 short_desc="Portable cross-platform audio I/O library"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="http://www.portaudio.com"
-distfiles="http://www.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
-checksum=f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513
+homepage="https://www.portaudio.com"
+distfiles="https://files.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
+checksum=47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def
 disable_parallel_build=yes
 
 # sndio disabled by default: non-upstream patch

From c6a9a1e8c0a4ec10046f2b7443f2e8ab1d15c368 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:22 +0600
Subject: [PATCH 4/7] soundtouch: update to 2.3.3.

---
 srcpkgs/soundtouch/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/soundtouch/template b/srcpkgs/soundtouch/template
index f9a7c06bee7a36..c56273fbb79264 100644
--- a/srcpkgs/soundtouch/template
+++ b/srcpkgs/soundtouch/template
@@ -1,6 +1,6 @@
 # Template file for 'soundtouch'
 pkgname=soundtouch
-version=2.3.2
+version=2.3.3
 revision=1
 build_style=gnu-configure
 configure_args="--enable-openmp"
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="LGPL-2.1-only"
 homepage="https://www.surina.net/soundtouch"
 distfiles="https://www.surina.net/soundtouch/soundtouch-${version}.tar.gz"
-checksum=3bde8ddbbc3661f04e151f72cf21ca9d8f8c88e265833b65935b8962d12d6b08
+checksum=43b23dfac2f64a3aff55d64be096ffc7b73842c3f5665caff44975633a975a99
 
 pre_configure() {
 	./bootstrap

From 968065962e361a620bc7de2c9786ceeef0191aaf Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:27 +0600
Subject: [PATCH 5/7] sqlite: update to 3.45.3.

---
 srcpkgs/sqlite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sqlite/template b/srcpkgs/sqlite/template
index 1d548eb479560b..4ae8fd4d281465 100644
--- a/srcpkgs/sqlite/template
+++ b/srcpkgs/sqlite/template
@@ -1,6 +1,6 @@
 # Template file for 'sqlite'
 pkgname=sqlite
-version=3.45.2
+version=3.45.3
 revision=1
 _amalgamationver=$(printf "%d%02d%02d00\n" ${version//./ })
 build_style=gnu-configure
@@ -12,7 +12,7 @@ license="Public Domain"
 homepage="https://sqlite.org/"
 changelog="https://www.sqlite.org/changes.html"
 distfiles="https://sqlite.org/2024/sqlite-autoconf-${_amalgamationver}.tar.gz"
-checksum=bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae
+checksum=b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531
 
 CFLAGS="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE \

From 4d2acdd55026b0dcd37327ae7fa660bbce254ad6 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:32 +0600
Subject: [PATCH 6/7] suil: update to 0.10.20.

---
 srcpkgs/suil/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/suil/template b/srcpkgs/suil/template
index 680e1972cd4371..58d7d4aceee052 100644
--- a/srcpkgs/suil/template
+++ b/srcpkgs/suil/template
@@ -1,8 +1,8 @@
 # Template file for 'suil'
 pkgname=suil
-version=0.10.12
+version=0.10.20
 revision=1
-build_style=waf3
+build_style=meson
 hostmakedepends="pkg-config lv2"
 makedepends="gtk+-devel qt5-devel gtk+3-devel"
 short_desc="Lightweight C library for loading and wrapping LV2 plugin UIs"
@@ -10,8 +10,8 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://drobilla.net/software/suil.html"
 changelog="https://gitlab.com/lv2/suil/-/raw/master/NEWS"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=daa763b231b22a1f532530d3e04c1fae48d1e1e03785e23c9ac138f207b87ecd
+distfiles="https://download.drobilla.net/suil-${version}.tar.xz"
+checksum=334a3ed3e73d5e17ff400b3db9801f63809155b0faa8b1b9046f9dd3ffef934e
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-host-tools qt5-devel"

From a571346f511a91bd45a7e54c479e7dce0696b297 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:39 +0600
Subject: [PATCH 7/7] wavpack: update to 5.7.0.

---
 srcpkgs/wavpack/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wavpack/template b/srcpkgs/wavpack/template
index d9b0f68f014bda..c6c65770f0d7fc 100644
--- a/srcpkgs/wavpack/template
+++ b/srcpkgs/wavpack/template
@@ -1,6 +1,6 @@
 # Template file for 'wavpack'
 pkgname=wavpack
-version=5.6.0
+version=5.7.0
 revision=1
 build_style=gnu-configure
 configure_args="--enable-static"
@@ -10,7 +10,7 @@ license="BSD-3-Clause"
 homepage="https://www.wavpack.com/"
 changelog="https://raw.githubusercontent.com/dbry/WavPack/master/NEWS"
 distfiles="https://www.wavpack.com/wavpack-${version}.tar.bz2"
-checksum=8cbfa15927d29bcf953db35c0cfca7424344ff43ebe4083daf161577fb839cc1
+checksum=8944b237968a1b3976a1eb47cd556916e041a2aa8917495db65f82c3fcc2a225
 
 case "$XBPS_TARGET_MACHINE" in
 	armv5*) configure_args+=" --disable-asm";;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] audacity: update to 3.5.1. Update audacity and deps
  2024-04-26 17:50 [PR PATCH] audacity: update to 3.5.1. Update audacity and deps iFoundSilentHouse
@ 2024-04-26 18:08 ` iFoundSilentHouse
  2024-04-26 18:12 ` iFoundSilentHouse
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: iFoundSilentHouse @ 2024-04-26 18:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

There is an updated pull request by iFoundSilentHouse against master on the void-packages repository

https://github.com/iFoundSilentHouse/void-packages audacity-3.5
https://github.com/void-linux/void-packages/pull/50047

[WIP] audacity: update to 3.5.1. Update audacity and deps
- I tested the changes in this PR: **YES**
- I built this PR locally for my native architecture, (x86_64-glibc)

Lilv dyn-manifest change: https://github.com/lv2/lilv/commit/17f6705ae6d0e8c7202f598f5271786a00a065be
Portaudio patches: https://github.com/PortAudio/portaudio/commit/45c12e8d18ae4434000ed1521e49d9b5ef91dedf
 new audacity works fine without `audacity-compat.patch`


A patch file from https://github.com/void-linux/void-packages/pull/50047.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-audacity-3.5-50047.patch --]
[-- Type: text/x-diff, Size: 46578 bytes --]

From 9dab9a6908feae52bf2e000a555a1ffb61819b97 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 19:11:47 +0600
Subject: [PATCH 1/7] audacity: update to 3.5.1.

---
 srcpkgs/audacity/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template
index 7b838119ab2611..27f17c0ec22eb0 100644
--- a/srcpkgs/audacity/template
+++ b/srcpkgs/audacity/template
@@ -1,6 +1,6 @@
 # Template file for 'audacity'
 pkgname=audacity
-version=3.4.2
+version=3.5.1
 revision=1
 build_style=cmake
 build_helper="cmake-wxWidgets-gtk3 qemu"
@@ -25,7 +25,7 @@ license="GPL-2.0-or-later, GPL-3.0-or-later, CC-BY-3.0"
 homepage="https://www.audacityteam.org"
 changelog="https://github.com/audacity/audacity/raw/master/CHANGELOG.txt"
 distfiles="https://github.com/audacity/audacity/releases/download/Audacity-${version}/audacity-sources-${version}.tar.gz"
-checksum=f28dd718d2c5a2aa9f207b8351443a90c1f02b65378ca94bcc7febda42635e48
+checksum=8786a1be8d63f4793fc3f2a5f1f61c441e0a4b9a7ed9137d59277ad5f72bd512
 
 CXXFLAGS="-D_FILE_OFFSET_BITS=64"
 

From 2231d6eb631da49cce3416e103b4fe7a47e65231 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:06 +0600
Subject: [PATCH 2/7] lilv: update to 0.24.24.

---
 srcpkgs/lilv/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/lilv/template b/srcpkgs/lilv/template
index 57f4bc30b9501b..bf03429f42c1e9 100644
--- a/srcpkgs/lilv/template
+++ b/srcpkgs/lilv/template
@@ -1,18 +1,18 @@
 # Template file for 'lilv'
 pkgname=lilv
-version=0.24.12
-revision=4
-build_style=waf3
-configure_args="--dyn-manifest"
+version=0.24.24
+revision=1
+build_style=meson
 hostmakedepends="pkg-config"
 makedepends="python3-devel serd-devel sord-devel sratom-devel libsndfile-devel
  lv2"
 short_desc="Simple yet powerful C API for using LV2 plugins"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="ISC"
-homepage="http://drobilla.net/software/lilv/"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=26a37790890c9c1f838203b47f5b2320334fe92c02a4d26ebbe2669dbd769061
+homepage="https://drobilla.net/software/lilv.html"
+changelog="https://raw.githubusercontent.com/lv2/lilv/master/NEWS"
+distfiles="https://download.drobilla.net/lilv-${version}.tar.xz"
+checksum=6bb6be9f88504176d0642f12de809b2b9e2dc55621a68adb8c7edb99aefabb4f
 
 post_install() {
 	vlicense COPYING
@@ -31,7 +31,8 @@ lilv-bash-completion_package() {
 	depends="bash-completion lilv"
 	short_desc+=" - Bash completion for Lilv"
 	pkg_install() {
-		vcompletion utils/lilv.bash_completion bash
+		vcompletion ${DESTDIR}/etc/bash_completion.d/lilv bash
+		rm -r ${DESTDIR}/etc
 	}
 }
 

From 266120e7d49587761855d621303365b2837592c7 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:14 +0600
Subject: [PATCH 3/7] portaudio: update to 190700.20210406.

---
 .../portaudio/patches/audacity-compat.patch   | 344 -------
 srcpkgs/portaudio/patches/sndio.patch         | 883 ------------------
 srcpkgs/portaudio/template                    |  14 +-
 3 files changed, 5 insertions(+), 1236 deletions(-)
 delete mode 100644 srcpkgs/portaudio/patches/audacity-compat.patch
 delete mode 100644 srcpkgs/portaudio/patches/sndio.patch

diff --git a/srcpkgs/portaudio/patches/audacity-compat.patch b/srcpkgs/portaudio/patches/audacity-compat.patch
deleted file mode 100644
index eb89f0a6346db2..00000000000000
--- a/srcpkgs/portaudio/patches/audacity-compat.patch
+++ /dev/null
@@ -1,344 +0,0 @@
-Source: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/portaudio-audacity-compat.patch
-Upstream: No
-Reason: Audacity needs Pa_GetStreamHostApiType to use system wide portaudio
-
-
-diff --git a/configure.in b/configure.in
-index 13816fb..83c239a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -420,6 +420,7 @@ case "${host_os}" in
-                    DLL_LIBS="$DLL_LIBS -lossaudio"
-                    LIBS="$LIBS -lossaudio"
-            fi
-+           INCLUDES="$INCLUDES pa_unix_oss.h"
-            AC_DEFINE(PA_USE_OSS,1)
-         fi
- 
-diff --git a/include/pa_unix_oss.h b/include/pa_unix_oss.h
-new file mode 100644
-index 0000000..64e04cb
---- /dev/null
-+++ b/include/pa_unix_oss.h
-@@ -0,0 +1,104 @@
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-diff --git a/include/pa_win_ds.h b/include/pa_win_ds.h
-index 5d38641..ba1c245 100644
---- a/include/pa_win_ds.h
-+++ b/include/pa_win_ds.h
-@@ -86,6 +86,21 @@ typedef struct PaWinDirectSoundStreamInfo{
- 
- }PaWinDirectSoundStreamInfo;
- 
-+/** Retrieve the GUID of the input device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
-+
-+/** Retrieve the GUID of the output device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
- 
- 
- #ifdef __cplusplus
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 8a94aaf..9c8a295 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -1197,6 +1197,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* stream );
- signed long Pa_GetStreamWriteAvailable( PaStream* stream );
- 
- 
-+/** Retrieve the host type handling an open stream.
-+
-+ @return Returns a non-negative value representing the host API type
-+ handling an open stream or, a PaErrorCode (which are always negative)
-+ if PortAudio is not initialized or an error is encountered.
-+*/
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
-+
-+
- /* Miscellaneous utilities */
- 
- 
-diff --git a/src/common/pa_front.c b/src/common/pa_front.c
-index 188cee9..52f44a6 100644
---- a/src/common/pa_front.c
-+++ b/src/common/pa_front.c
-@@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream,
-                                   hostApiInputParametersPtr, hostApiOutputParametersPtr,
-                                   sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
- 
--    if( result == paNoError )
-+    if( result == paNoError ) {
-         AddOpenStream( *stream );
-+        PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
-+    }
- 
- 
-     PA_LOGAPI(("Pa_OpenStream returned:\n" ));
-@@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream )
-     return result;
- }
- 
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
-+{
-+    PaError error = PaUtil_ValidateStreamPointer( stream );
-+    PaHostApiTypeId result;
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
-+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
-+#endif
-+
-+    if( error == paNoError )
-+    {
-+        result = PA_STREAM_REP(stream)->hostApiType;
-+    }
-+    else
-+    {
-+        result = (PaHostApiTypeId) error;
-+    }
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
-+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
-+#endif
-+
-+    return result;
-+}
- 
- PaError Pa_GetSampleSize( PaSampleFormat format )
- {
-diff --git a/src/common/pa_stream.c b/src/common/pa_stream.c
-index 03a0ee6..c4376f9 100644
---- a/src/common/pa_stream.c
-+++ b/src/common/pa_stream.c
-@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe
-     streamRepresentation->streamInfo.inputLatency = 0.;
-     streamRepresentation->streamInfo.outputLatency = 0.;
-     streamRepresentation->streamInfo.sampleRate = 0.;
-+
-+    streamRepresentation->hostApiType = 0;
- }
- 
- 
-diff --git a/src/common/pa_stream.h b/src/common/pa_stream.h
-index 678e2ad..70572c7 100644
---- a/src/common/pa_stream.h
-+++ b/src/common/pa_stream.h
-@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation {
-     PaStreamFinishedCallback *streamFinishedCallback;
-     void *userData;
-     PaStreamInfo streamInfo;
-+    PaHostApiTypeId hostApiType;
- } PaUtilStreamRepresentation;
- 
- 
-diff --git a/src/hostapi/alsa/pa_linux_alsa.c b/src/hostapi/alsa/pa_linux_alsa.c
-index 584cde8..558fb3d 100644
---- a/src/hostapi/alsa/pa_linux_alsa.c
-+++ b/src/hostapi/alsa/pa_linux_alsa.c
-@@ -621,6 +621,7 @@ typedef struct
-     StreamDirection streamDir;
- 
-     snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */
-+    int card;
- } PaAlsaStreamComponent;
- 
- /* Implementation specific stream structure */
-@@ -1873,6 +1874,7 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
- {
-     PaError result = paNoError;
-     PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError;
-+    snd_pcm_info_t* pcmInfo;
-     assert( params->channelCount > 0 );
- 
-     /* Make sure things have an initial value */
-@@ -1900,6 +1902,9 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
-     self->device = params->device;
- 
-     PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) );
-+
-+    snd_pcm_info_alloca( &pcmInfo );
-+    self->card = snd_pcm_info_get_card( pcmInfo );
-     self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm );
- 
-     PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) );
-@@ -4605,9 +4610,7 @@ PaError PaAlsa_GetStreamInputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->capture.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->capture.card;
- 
- error:
-     return result;
-@@ -4624,9 +4627,7 @@ PaError PaAlsa_GetStreamOutputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->playback.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->playback.card;
- 
- error:
-     return result;
-diff --git a/src/hostapi/coreaudio/pa_mac_core_blocking.c b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-index 679c6ba..a69e085 100644
---- a/src/hostapi/coreaudio/pa_mac_core_blocking.c
-+++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-@@ -66,6 +66,9 @@
- #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
- # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
- # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
-+#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
-+# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
-+# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
- #else
- # include <libkern/OSAtomic.h>
- #endif
-diff --git a/src/hostapi/oss/pa_unix_oss.c b/src/hostapi/oss/pa_unix_oss.c
-index 51e9630..f257d80 100644
---- a/src/hostapi/oss/pa_unix_oss.c
-+++ b/src/hostapi/oss/pa_unix_oss.c
-@@ -2043,3 +2043,26 @@ error:
- #endif
- }
- 
-+const char *PaOSS_GetStreamInputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->capture )
-+    {
-+      return stream->capture->devName;
-+    }
-+
-+   return NULL;
-+}
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->playback )
-+    {
-+      return stream->playback->devName;
-+    }
-+
-+   return NULL;
-+}
diff --git a/srcpkgs/portaudio/patches/sndio.patch b/srcpkgs/portaudio/patches/sndio.patch
deleted file mode 100644
index 9fc20960d58622..00000000000000
--- a/srcpkgs/portaudio/patches/sndio.patch
+++ /dev/null
@@ -1,883 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 5e1a764..2747f73 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -44,7 +44,7 @@ PALIB = libportaudio.la
- PAINC = include/portaudio.h
- 
- PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \
--	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \
-+	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS|PaSndio)_.*" \
- 	     -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
- 
- COMMON_OBJS = \
-@@ -146,6 +146,7 @@ SRC_DIRS = \
- 	src/hostapi/dsound \
- 	src/hostapi/jack \
- 	src/hostapi/oss \
-+	src/hostapi/sndio \
- 	src/hostapi/wasapi \
- 	src/hostapi/wdmks \
- 	src/hostapi/wmme \
-diff --git a/configure.in b/configure.in
-index 83c239a..db11d65 100644
---- a/configure.in
-+++ b/configure.in
-@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
-             AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
-             [with_alsa=$withval])
- 
-+AC_ARG_WITH(sndio,
-+            AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
-+            [with_sndio=$withval])
-+
- AC_ARG_WITH(jack,
-             AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
-             [with_jack=$withval])
-@@ -120,6 +124,10 @@ have_alsa=no
- if test "x$with_alsa" != "xno"; then
-     AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
- fi
-+have_sndio=no
-+if test "x$with_sndio" != "xno"; then
-+    AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
-+fi
- have_asihpi=no
- if test "x$with_asihpi" != "xno"; then
-     AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
-@@ -406,6 +414,13 @@ case "${host_os}" in
-            AC_DEFINE(PA_USE_ALSA,1)
-         fi
- 
-+        if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
-+            DLL_LIBS="$DLL_LIBS -lsndio"
-+            LIBS="$LIBS -lsndio"
-+            OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
-+            AC_DEFINE(PA_USE_SNDIO,1)
-+        fi
-+
-         if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
-            DLL_LIBS="$DLL_LIBS $JACK_LIBS"
-            CFLAGS="$CFLAGS $JACK_CFLAGS"
-@@ -510,6 +525,7 @@ case "$target_os" in
-         ;;
-      *)
- 	AC_MSG_RESULT([
-+  Sndio ....................... $have_sndio
-   OSS ......................... $have_oss
-   JACK ........................ $have_jack
- ])
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 9c8a295..e535a02 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
-     paWDMKS=11,
-     paJACK=12,
-     paWASAPI=13,
--    paAudioScienceHPI=14
-+    paAudioScienceHPI=14,
-+    paSndio=15
- } PaHostApiTypeId;
- 
- 
-diff --git a/src/hostapi/sndio/pa_sndio.c b/src/hostapi/sndio/pa_sndio.c
-new file mode 100644
-index 0000000..725ef47
---- /dev/null
-+++ b/src/hostapi/sndio/pa_sndio.c
-@@ -0,0 +1,768 @@
-+/*
-+ * Copyright (c) 2009 Alexandre Ratchov <alex@caoua.org>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+#include <sys/types.h>
-+#include <pthread.h>
-+#include <poll.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <sndio.h>
-+
-+#include "pa_util.h"
-+#include "pa_hostapi.h"
-+#include "pa_stream.h"
-+#include "pa_process.h"
-+#include "pa_allocation.h"
-+
-+#if 0
-+#define DPR(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
-+#else
-+#define DPR(...) do {} while (0)
-+#endif
-+
-+/*
-+ * per-stream data
-+ */
-+typedef struct PaSndioStream
-+{
-+	PaUtilStreamRepresentation base;
-+	PaUtilBufferProcessor bufproc;	/* format conversion */
-+	struct sio_hdl *hdl;		/* handle for device i/o */
-+	struct sio_par par;		/* current device parameters */	
-+	unsigned mode;			/* SIO_PLAY, SIO_REC or both */
-+	int stopped;			/* stop requested or not started */
-+	int active;			/* thread is running */
-+	unsigned long long realpos;	/* frame number h/w is processing */
-+	char *rbuf, *wbuf;		/* bounce buffers for conversions */
-+	unsigned long long rpos, wpos;	/* bytes read/written */
-+	pthread_t thread;		/* thread of the callback interface */
-+} PaSndioStream;
-+
-+/*
-+ * api "class" data, common to all streams
-+ */
-+typedef struct PaSndioHostApiRepresentation
-+{
-+	PaUtilHostApiRepresentation base;
-+	PaUtilStreamInterface callback;
-+	PaUtilStreamInterface blocking;
-+	/*
-+	 * sndio has no device discovery mechanism and PortAudio has
-+	 * no way of accepting raw device strings from users.
-+	 * Normally we just expose the default device, which can be
-+	 * changed via the AUDIODEVICE environment variable, but we
-+	 * also allow specifying a list of up to 16 devices via the
-+	 * PA_SNDIO_AUDIODEVICES environment variable.
-+	 *
-+	 * Example:
-+	 * PA_SNDIO_AUDIODEVICES=default:snd/0.monitor:snd@remote/0
-+	 */
-+#define PA_SNDIO_AUDIODEVICES_MAX	16
-+	PaDeviceInfo device_info[PA_SNDIO_AUDIODEVICES_MAX];
-+	PaDeviceInfo *infos[PA_SNDIO_AUDIODEVICES_MAX];
-+	char *audiodevices;
-+} PaSndioHostApiRepresentation;
-+
-+/*
-+ * callback invoked when blocks are processed by the hardware
-+ */
-+static void
-+sndioOnMove(void *addr, int delta)
-+{
-+	PaSndioStream *s = (PaSndioStream *)addr;
-+
-+	s->realpos += delta;
-+}
-+
-+/*
-+ * convert PA encoding to sndio encoding, return true on success
-+ */
-+static int
-+sndioSetFmt(struct sio_par *sio, PaSampleFormat fmt)
-+{
-+	switch (fmt & ~paNonInterleaved) {
-+	case paInt32:
-+		sio->sig = 1;
-+		sio->bits = 32;
-+		break;
-+	case paInt24:
-+		sio->sig = 1;
-+		sio->bits = 24;
-+		sio->bps = 3;	/* paInt24 is packed format */
-+		break;
-+	case paInt16:
-+	case paFloat32:
-+		sio->sig = 1;
-+		sio->bits = 16;
-+		break;
-+	case paInt8:
-+		sio->sig = 1;
-+		sio->bits = 8;
-+		break;
-+	case paUInt8:
-+		sio->sig = 0;
-+		sio->bits = 8;
-+		break;
-+	default:
-+		DPR("sndioSetFmt: %x: unsupported\n", fmt);
-+		return 0;
-+	}
-+	sio->le = SIO_LE_NATIVE;
-+	return 1;
-+}
-+
-+/*
-+ * convert sndio encoding to PA encoding, return true on success
-+ */
-+static int
-+sndioGetFmt(struct sio_par *sio, PaSampleFormat *fmt)
-+{
-+	if ((sio->bps * 8 != sio->bits && !sio->msb) ||
-+	    (sio->bps > 1 && sio->le != SIO_LE_NATIVE)) {
-+		DPR("sndioGetFmt: bits = %u, le = %u, msb = %u, bps = %u\n",
-+		    sio->bits, sio->le, sio->msb, sio->bps);
-+		return 0;
-+	}
-+
-+	switch (sio->bits) {
-+	case 32:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt32;
-+		break;
-+	case 24:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = (sio->bps == 3) ? paInt24 : paInt32;
-+		break;
-+	case 16:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt16;
-+		break;
-+	case 8:
-+		*fmt = sio->sig ? paInt8 : paUInt8;
-+		break;
-+	default:
-+		DPR("sndioGetFmt: %u: unsupported\n", sio->bits);
-+		return 0;
-+	}
-+	return 1;
-+}
-+
-+/*
-+ * I/O loop for callback interface
-+ */
-+static void *
-+sndioThread(void *arg)
-+{
-+	PaSndioStream *s = (PaSndioStream *)arg;
-+	PaStreamCallbackTimeInfo ti;
-+	unsigned char *data;
-+	unsigned todo, rblksz, wblksz;
-+	int n, result;
-+	
-+	rblksz = s->par.round * s->par.rchan * s->par.bps;
-+	wblksz = s->par.round * s->par.pchan * s->par.bps;
-+	
-+	DPR("sndioThread: mode = %x, round = %u, rblksz = %u, wblksz = %u\n",
-+	    s->mode, s->par.round, rblksz, wblksz);
-+	
-+	while (!s->stopped) {
-+		if (s->mode & SIO_REC) {
-+			todo = rblksz;
-+			data = s->rbuf;
-+			while (todo > 0) {
-+				n = sio_read(s->hdl, data, todo);
-+				if (n == 0) {
-+					DPR("sndioThread: sio_read failed\n");
-+					goto failed;
-+				}
-+				todo -= n;
-+				data += n;
-+			}
-+			s->rpos += s->par.round;
-+			ti.inputBufferAdcTime = 
-+			    (double)s->realpos / s->par.rate;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			ti.outputBufferDacTime =
-+			    (double)(s->realpos + s->par.bufsz) / s->par.rate;
-+		}
-+		ti.currentTime = s->realpos / (double)s->par.rate;
-+		PaUtil_BeginBufferProcessing(&s->bufproc, &ti, 0);
-+		if (s->mode & SIO_PLAY) {
-+			PaUtil_SetOutputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedOutputChannels(&s->bufproc,
-+			    0, s->wbuf, s->par.pchan);
-+		}
-+		if (s->mode & SIO_REC) {
-+			PaUtil_SetInputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedInputChannels(&s->bufproc,
-+			    0, s->rbuf, s->par.rchan);
-+		}
-+		result = paContinue;
-+		n = PaUtil_EndBufferProcessing(&s->bufproc, &result);
-+		if (n != s->par.round) {
-+			DPR("sndioThread: %d < %u frames, result = %d\n",
-+			    n, s->par.round, result);
-+		}
-+		if (result != paContinue) {
-+			break;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			n = sio_write(s->hdl, s->wbuf, wblksz);
-+			if (n < wblksz) {
-+				DPR("sndioThread: sio_write failed\n");
-+				goto failed;
-+			}
-+			s->wpos += s->par.round;
-+		}
-+	}
-+ failed:
-+	s->active = 0;
-+	DPR("sndioThread: done\n");
-+}
-+
-+static PaError
-+OpenStream(struct PaUtilHostApiRepresentation *hostApi,
-+    PaStream **stream,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate,
-+    unsigned long framesPerBuffer,
-+    PaStreamFlags streamFlags,
-+    PaStreamCallback *streamCallback,
-+    void *userData)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	PaSndioStream *s;
-+	PaError err;
-+	struct sio_hdl *hdl;
-+	struct sio_par par;
-+	unsigned mode;
-+	int inch, onch;
-+	PaSampleFormat ifmt, ofmt, siofmt;
-+	const char *dev;
-+
-+	DPR("OpenStream:\n");
-+
-+	mode = 0;
-+	inch = onch = 0;
-+	ifmt = ofmt = 0;
-+	sio_initpar(&par);
-+
-+	if (outputPar && outputPar->channelCount > 0) {
-+		if (outputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad output device\n", outputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (outputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: output specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, outputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ofmt = outputPar->sampleFormat;
-+		onch = par.pchan = outputPar->channelCount;
-+		mode |= SIO_PLAY;
-+	}
-+	if (inputPar && inputPar->channelCount > 0) {
-+		if (inputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad input device\n", inputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (inputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: input specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, inputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ifmt = inputPar->sampleFormat;
-+		inch = par.rchan = inputPar->channelCount;
-+		mode |= SIO_REC;
-+	}
-+	par.rate = sampleRate;
-+	if (framesPerBuffer != paFramesPerBufferUnspecified)
-+		par.round = framesPerBuffer;
-+
-+	DPR("OpenStream: mode = %x, trying rate = %u\n", mode, par.rate);
-+
-+	if (outputPar) {
-+		dev = sndioHostApi->device_info[outputPar->device].name;
-+	} else if (inputPar) {
-+		dev = sndioHostApi->device_info[inputPar->device].name;
-+	} else {
-+		return paUnanticipatedHostError;
-+	}
-+	hdl = sio_open(dev, mode, 0);
-+	if (hdl == NULL)
-+		return paUnanticipatedHostError;
-+	if (!sio_setpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sio_getpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sndioGetFmt(&par, &siofmt)) {
-+		sio_close(hdl);
-+		return paSampleFormatNotSupported;
-+	}
-+	if ((mode & SIO_REC) && par.rchan != inputPar->channelCount) {
-+		DPR("OpenStream: rchan(%u) != %d\n", par.rchan, inputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((mode & SIO_PLAY) && par.pchan != outputPar->channelCount) {
-+		DPR("OpenStream: pchan(%u) != %d\n", par.pchan, outputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((double)par.rate < sampleRate * 0.995 ||
-+	    (double)par.rate > sampleRate * 1.005) {
-+		DPR("OpenStream: rate(%u) != %g\n", par.rate, sampleRate);
-+		sio_close(hdl);
-+		return paInvalidSampleRate;
-+	}
-+	
-+	s = (PaSndioStream *)PaUtil_AllocateMemory(sizeof(PaSndioStream));
-+	if (s == NULL) {
-+		sio_close(hdl);
-+		return paInsufficientMemory;
-+	}
-+	PaUtil_InitializeStreamRepresentation(&s->base, 
-+	    streamCallback ? &sndioHostApi->callback : &sndioHostApi->blocking,
-+	    streamCallback, userData);
-+	DPR("inch = %d, onch = %d, ifmt = %x, ofmt = %x\n", 
-+	    inch, onch, ifmt, ofmt);
-+	err = PaUtil_InitializeBufferProcessor(&s->bufproc,
-+	    inch, ifmt, siofmt,
-+	    onch, ofmt, siofmt,
-+	    sampleRate,
-+	    streamFlags,
-+	    framesPerBuffer,
-+	    par.round,
-+	    paUtilFixedHostBufferSize, 
-+	    streamCallback, userData);
-+	if (err) {
-+		DPR("OpenStream: PaUtil_InitializeBufferProcessor failed\n");
-+		PaUtil_FreeMemory(s);
-+		sio_close(hdl);
-+		return err;
-+	}
-+	if (mode & SIO_REC) {
-+		s->rbuf = malloc(par.round * par.rchan * par.bps);
-+		if (s->rbuf == NULL) {
-+			DPR("OpenStream: failed to allocate rbuf\n");
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}
-+	if (mode & SIO_PLAY) {
-+		s->wbuf = malloc(par.round * par.pchan * par.bps);
-+		if (s->wbuf == NULL) {
-+			DPR("OpenStream: failed to allocate wbuf\n");
-+			free(s->rbuf);
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}	
-+	s->base.streamInfo.inputLatency = 0;
-+	s->base.streamInfo.outputLatency = (mode & SIO_PLAY) ?
-+	    (double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatencyFrames(&s->bufproc)) / (double)par.rate : 0;
-+	s->base.streamInfo.sampleRate = par.rate;
-+	s->active = 0;
-+	s->stopped = 1;
-+	s->mode = mode;
-+	s->hdl = hdl;
-+	s->par = par;
-+	*stream = s;	
-+	DPR("OpenStream: done\n");
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingReadStream(PaStream *stream, void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res, todo;
-+	void *buf;
-+	
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		buf = s->rbuf;
-+		todo = n * s->par.rchan * s->par.bps;
-+		while (todo > 0) {
-+			res = sio_read(s->hdl, buf, todo);
-+			if (res == 0)
-+				return paUnanticipatedHostError;
-+			buf = (char *)buf + res;
-+			todo -= res;
-+		}
-+		s->rpos += n;
-+		PaUtil_SetInputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedInputChannels(&s->bufproc, 0, s->rbuf, s->par.rchan);
-+		res = PaUtil_CopyInput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingReadStream: copyInput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingWriteStream(PaStream* stream, const void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res;
-+
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		PaUtil_SetOutputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedOutputChannels(&s->bufproc, 0, s->wbuf, s->par.pchan);
-+		res = PaUtil_CopyOutput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingWriteStream: copyOutput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		res = sio_write(s->hdl, s->wbuf, n * s->par.pchan * s->par.bps);
-+		if (res == 0)
-+			return paUnanticipatedHostError;		
-+		s->wpos += n;
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static signed long
-+BlockingGetStreamReadAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLIN);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLIN))
-+		return 0;
-+
-+	return s->realpos - s->rpos;
-+}
-+
-+static signed long
-+BlockingGetStreamWriteAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLOUT);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLOUT))
-+		return 0;
-+
-+	return s->par.bufsz - (s->wpos - s->realpos);
-+}
-+
-+static PaError
-+BlockingWaitEmpty( PaStream *stream )
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	/*
-+	 * drain playback buffers; sndio always does it in background
-+	 * and there is no way to wait for completion
-+	 */
-+	DPR("BlockingWaitEmpty: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return paNoError;
-+}
-+
-+static PaError
-+StartStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned primes, wblksz;
-+	int err;
-+
-+	DPR("StartStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (!s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 0;
-+	s->active = 1;
-+	s->realpos = 0;
-+	s->wpos = 0;
-+	s->rpos = 0;
-+	PaUtil_ResetBufferProcessor(&s->bufproc);
-+	if (!sio_start(s->hdl))
-+		return paUnanticipatedHostError;
-+
-+	/*
-+	 * send a complete buffer of silence
-+	 */
-+	if (s->mode & SIO_PLAY) {
-+		wblksz = s->par.round * s->par.pchan * s->par.bps;
-+		memset(s->wbuf, 0, wblksz);
-+		for (primes = s->par.bufsz / s->par.round; primes > 0; primes--)
-+			s->wpos += sio_write(s->hdl, s->wbuf, wblksz);
-+	}
-+	if (s->base.streamCallback) {
-+		err = pthread_create(&s->thread, NULL, sndioThread, s);
-+		if (err) {
-+			DPR("SndioStartStream: couldn't create thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+		DPR("StartStream: started...\n");
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+StopStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	void *ret;
-+	int err;
-+
-+	DPR("StopStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 1;
-+	if (s->base.streamCallback) {
-+		err = pthread_join(s->thread, &ret);
-+		if (err) {
-+			DPR("SndioStop: couldn't join thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+	}
-+	if (!sio_stop(s->hdl))
-+		return paUnanticipatedHostError;
-+	return paNoError;
-+}
-+
-+static PaError
-+CloseStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	DPR("CloseStream:\n");
-+
-+	if (!s->stopped)
-+		StopStream(stream);
-+
-+	if (s->mode & SIO_REC)
-+		free(s->rbuf);
-+	if (s->mode & SIO_PLAY)
-+		free(s->wbuf);
-+	sio_close(s->hdl);
-+        PaUtil_TerminateStreamRepresentation(&s->base);
-+	PaUtil_TerminateBufferProcessor(&s->bufproc);
-+	PaUtil_FreeMemory(s);
-+	return paNoError;
-+}
-+
-+static PaError
-+AbortStream(PaStream *stream)
-+{
-+	DPR("AbortStream:\n");
-+
-+	return StopStream(stream);
-+}
-+
-+static PaError
-+IsStreamStopped(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamStopped: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->stopped;
-+}
-+
-+static PaError
-+IsStreamActive(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamActive: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->active;
-+}
-+
-+static PaTime
-+GetStreamTime(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	return (double)s->realpos / s->base.streamInfo.sampleRate;
-+}
-+
-+static PaError
-+IsFormatSupported(struct PaUtilHostApiRepresentation *hostApi,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate)
-+{
-+	return paFormatIsSupported;
-+}
-+
-+static void
-+Terminate(struct PaUtilHostApiRepresentation *hostApi)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	free(sndioHostApi->audiodevices);
-+	PaUtil_FreeMemory(hostApi);
-+}
-+
-+static void
-+InitDeviceInfo(PaDeviceInfo *info, PaHostApiIndex hostApiIndex, const char *name)
-+{
-+	info->structVersion = 2;
-+	info->name = name;
-+	info->hostApi = hostApiIndex;
-+	info->maxInputChannels = 128;
-+	info->maxOutputChannels = 128;
-+	info->defaultLowInputLatency = 0.01;
-+	info->defaultLowOutputLatency = 0.01;
-+	info->defaultHighInputLatency = 0.5;
-+	info->defaultHighOutputLatency = 0.5;
-+	info->defaultSampleRate = 48000;
-+}
-+
-+PaError
-+PaSndio_Initialize(PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	PaDeviceInfo *info;
-+	struct sio_hdl *hdl;
-+	char *audiodevices;
-+	char *device;
-+	size_t deviceCount;
-+
-+	DPR("PaSndio_Initialize: initializing...\n");
-+
-+	if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) == NULL)
-+		return paNoError;
-+	sio_close(hdl);
-+	/* unusable APIs should return paNoError and a NULL hostApi */
-+	*hostApi = NULL;
-+
-+	sndioHostApi = PaUtil_AllocateMemory(sizeof(PaSndioHostApiRepresentation));
-+	if (sndioHostApi == NULL)
-+		return paNoError;
-+
-+	// Add default device
-+	info = &sndioHostApi->device_info[0];
-+	InitDeviceInfo(info, hostApiIndex, SIO_DEVANY);
-+	sndioHostApi->infos[0] = info;
-+	deviceCount = 1;
-+
-+	// Add additional devices as specified in the PA_SNDIO_AUDIODEVICES
-+	// environment variable as a colon separated list
-+	sndioHostApi->audiodevices = NULL;
-+	audiodevices = getenv("PA_SNDIO_AUDIODEVICES");
-+	if (audiodevices != NULL) {
-+		sndioHostApi->audiodevices = strdup(audiodevices);
-+		if (sndioHostApi->audiodevices == NULL)
-+			return paNoError;
-+
-+		audiodevices = sndioHostApi->audiodevices;
-+		while ((device = strsep(&audiodevices, ":")) != NULL &&
-+			deviceCount < PA_SNDIO_AUDIODEVICES_MAX) {
-+			if (*device == '\0')
-+				continue;
-+			info = &sndioHostApi->device_info[deviceCount];
-+			InitDeviceInfo(info, hostApiIndex, device);
-+			sndioHostApi->infos[deviceCount] = info;
-+			deviceCount++;
-+		}
-+	}
-+
-+	*hostApi = &sndioHostApi->base;
-+	(*hostApi)->info.structVersion = 1;
-+	(*hostApi)->info.type = paSndio;
-+	(*hostApi)->info.name = "sndio";
-+	(*hostApi)->info.deviceCount = deviceCount;
-+	(*hostApi)->info.defaultInputDevice = 0;
-+	(*hostApi)->info.defaultOutputDevice = 0;
-+	(*hostApi)->deviceInfos = sndioHostApi->infos;
-+	(*hostApi)->Terminate = Terminate;
-+	(*hostApi)->OpenStream = OpenStream;
-+	(*hostApi)->IsFormatSupported = IsFormatSupported;
-+	
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->blocking,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    BlockingReadStream,
-+	    BlockingWriteStream,
-+	    BlockingGetStreamReadAvailable,
-+	    BlockingGetStreamWriteAvailable);
-+
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->callback,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    PaUtil_DummyRead,
-+	    PaUtil_DummyWrite,
-+	    PaUtil_DummyGetReadAvailable,
-+	    PaUtil_DummyGetWriteAvailable);
-+
-+	DPR("PaSndio_Initialize: done\n");
-+	return paNoError;
-+}
-diff --git a/src/os/unix/pa_unix_hostapis.c b/src/os/unix/pa_unix_hostapis.c
-index a9b4a05..f10ced1 100644
---- a/src/os/unix/pa_unix_hostapis.c
-+++ b/src/os/unix/pa_unix_hostapis.c
-@@ -44,6 +44,7 @@
- 
- PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-+PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- /* Added for IRIX, Pieter, oct 2, 2003: */
- PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-@@ -57,6 +58,10 @@ PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiI
- 
- PaUtilHostApiInitializer *paHostApiInitializers[] =
-     {
-+#ifdef PA_USE_SNDIO
-+	    PaSndio_Initialize,
-+#endif
-+
- #ifdef __linux__
- 
- #if PA_USE_ALSA
--- 
-2.27.0
-
diff --git a/srcpkgs/portaudio/template b/srcpkgs/portaudio/template
index 54dcd9a7215504..5492f62329a04e 100644
--- a/srcpkgs/portaudio/template
+++ b/srcpkgs/portaudio/template
@@ -1,7 +1,7 @@
 # Template file for 'portaudio'
 pkgname=portaudio
-version=190600.20161030
-revision=6
+version=190700.20210406
+revision=1
 build_style=gnu-configure
 configure_args="--enable-cxx --with-jack $(vopt_enable sndio)"
 hostmakedepends="pkg-config"
@@ -9,15 +9,11 @@ makedepends="alsa-lib-devel jack-devel $(vopt_if sndio sndio-devel)"
 short_desc="Portable cross-platform audio I/O library"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="http://www.portaudio.com"
-distfiles="http://www.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
-checksum=f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513
+homepage="https://www.portaudio.com"
+distfiles="https://files.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
+checksum=47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def
 disable_parallel_build=yes
 
-# sndio disabled by default: non-upstream patch
-build_options="sndio"
-build_options_default=""
-
 post_install() {
 	vlicense LICENSE.txt
 }

From 62c1f13c20ce4943d1ade6b1050f812735fe64cc Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:22 +0600
Subject: [PATCH 4/7] soundtouch: update to 2.3.3.

---
 srcpkgs/soundtouch/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/soundtouch/template b/srcpkgs/soundtouch/template
index f9a7c06bee7a36..c56273fbb79264 100644
--- a/srcpkgs/soundtouch/template
+++ b/srcpkgs/soundtouch/template
@@ -1,6 +1,6 @@
 # Template file for 'soundtouch'
 pkgname=soundtouch
-version=2.3.2
+version=2.3.3
 revision=1
 build_style=gnu-configure
 configure_args="--enable-openmp"
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="LGPL-2.1-only"
 homepage="https://www.surina.net/soundtouch"
 distfiles="https://www.surina.net/soundtouch/soundtouch-${version}.tar.gz"
-checksum=3bde8ddbbc3661f04e151f72cf21ca9d8f8c88e265833b65935b8962d12d6b08
+checksum=43b23dfac2f64a3aff55d64be096ffc7b73842c3f5665caff44975633a975a99
 
 pre_configure() {
 	./bootstrap

From 5cdd191a919ae622d248c330f833985ae46a5a08 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:27 +0600
Subject: [PATCH 5/7] sqlite: update to 3.45.3.

---
 srcpkgs/sqlite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sqlite/template b/srcpkgs/sqlite/template
index 1d548eb479560b..4ae8fd4d281465 100644
--- a/srcpkgs/sqlite/template
+++ b/srcpkgs/sqlite/template
@@ -1,6 +1,6 @@
 # Template file for 'sqlite'
 pkgname=sqlite
-version=3.45.2
+version=3.45.3
 revision=1
 _amalgamationver=$(printf "%d%02d%02d00\n" ${version//./ })
 build_style=gnu-configure
@@ -12,7 +12,7 @@ license="Public Domain"
 homepage="https://sqlite.org/"
 changelog="https://www.sqlite.org/changes.html"
 distfiles="https://sqlite.org/2024/sqlite-autoconf-${_amalgamationver}.tar.gz"
-checksum=bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae
+checksum=b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531
 
 CFLAGS="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE \

From da9cd680fec9d48d85cc802d9a6109a6a7345879 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:32 +0600
Subject: [PATCH 6/7] suil: update to 0.10.20.

---
 srcpkgs/suil/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/suil/template b/srcpkgs/suil/template
index 680e1972cd4371..58d7d4aceee052 100644
--- a/srcpkgs/suil/template
+++ b/srcpkgs/suil/template
@@ -1,8 +1,8 @@
 # Template file for 'suil'
 pkgname=suil
-version=0.10.12
+version=0.10.20
 revision=1
-build_style=waf3
+build_style=meson
 hostmakedepends="pkg-config lv2"
 makedepends="gtk+-devel qt5-devel gtk+3-devel"
 short_desc="Lightweight C library for loading and wrapping LV2 plugin UIs"
@@ -10,8 +10,8 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://drobilla.net/software/suil.html"
 changelog="https://gitlab.com/lv2/suil/-/raw/master/NEWS"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=daa763b231b22a1f532530d3e04c1fae48d1e1e03785e23c9ac138f207b87ecd
+distfiles="https://download.drobilla.net/suil-${version}.tar.xz"
+checksum=334a3ed3e73d5e17ff400b3db9801f63809155b0faa8b1b9046f9dd3ffef934e
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-host-tools qt5-devel"

From 7483819438ca3e558093f6bc1d614da989dac740 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:39 +0600
Subject: [PATCH 7/7] wavpack: update to 5.7.0.

---
 srcpkgs/wavpack/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wavpack/template b/srcpkgs/wavpack/template
index d9b0f68f014bda..c6c65770f0d7fc 100644
--- a/srcpkgs/wavpack/template
+++ b/srcpkgs/wavpack/template
@@ -1,6 +1,6 @@
 # Template file for 'wavpack'
 pkgname=wavpack
-version=5.6.0
+version=5.7.0
 revision=1
 build_style=gnu-configure
 configure_args="--enable-static"
@@ -10,7 +10,7 @@ license="BSD-3-Clause"
 homepage="https://www.wavpack.com/"
 changelog="https://raw.githubusercontent.com/dbry/WavPack/master/NEWS"
 distfiles="https://www.wavpack.com/wavpack-${version}.tar.bz2"
-checksum=8cbfa15927d29bcf953db35c0cfca7424344ff43ebe4083daf161577fb839cc1
+checksum=8944b237968a1b3976a1eb47cd556916e041a2aa8917495db65f82c3fcc2a225
 
 case "$XBPS_TARGET_MACHINE" in
 	armv5*) configure_args+=" --disable-asm";;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] audacity: update to 3.5.1. Update audacity and deps
  2024-04-26 17:50 [PR PATCH] audacity: update to 3.5.1. Update audacity and deps iFoundSilentHouse
  2024-04-26 18:08 ` [PR PATCH] [Updated] [WIP] " iFoundSilentHouse
@ 2024-04-26 18:12 ` iFoundSilentHouse
  2024-04-26 19:17 ` iFoundSilentHouse
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: iFoundSilentHouse @ 2024-04-26 18:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

There is an updated pull request by iFoundSilentHouse against master on the void-packages repository

https://github.com/iFoundSilentHouse/void-packages audacity-3.5
https://github.com/void-linux/void-packages/pull/50047

[WIP] audacity: update to 3.5.1. Update audacity and deps
- I tested the changes in this PR: **YES**
- I built this PR locally for my native architecture, (x86_64-glibc)

Lilv dyn-manifest change: https://github.com/lv2/lilv/commit/17f6705ae6d0e8c7202f598f5271786a00a065be
Portaudio patches: https://github.com/PortAudio/portaudio/commit/45c12e8d18ae4434000ed1521e49d9b5ef91dedf
 new audacity works fine without `audacity-compat.patch`


A patch file from https://github.com/void-linux/void-packages/pull/50047.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-audacity-3.5-50047.patch --]
[-- Type: text/x-diff, Size: 46672 bytes --]

From 9dab9a6908feae52bf2e000a555a1ffb61819b97 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 19:11:47 +0600
Subject: [PATCH 1/7] audacity: update to 3.5.1.

---
 srcpkgs/audacity/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template
index 7b838119ab2611..27f17c0ec22eb0 100644
--- a/srcpkgs/audacity/template
+++ b/srcpkgs/audacity/template
@@ -1,6 +1,6 @@
 # Template file for 'audacity'
 pkgname=audacity
-version=3.4.2
+version=3.5.1
 revision=1
 build_style=cmake
 build_helper="cmake-wxWidgets-gtk3 qemu"
@@ -25,7 +25,7 @@ license="GPL-2.0-or-later, GPL-3.0-or-later, CC-BY-3.0"
 homepage="https://www.audacityteam.org"
 changelog="https://github.com/audacity/audacity/raw/master/CHANGELOG.txt"
 distfiles="https://github.com/audacity/audacity/releases/download/Audacity-${version}/audacity-sources-${version}.tar.gz"
-checksum=f28dd718d2c5a2aa9f207b8351443a90c1f02b65378ca94bcc7febda42635e48
+checksum=8786a1be8d63f4793fc3f2a5f1f61c441e0a4b9a7ed9137d59277ad5f72bd512
 
 CXXFLAGS="-D_FILE_OFFSET_BITS=64"
 

From 2231d6eb631da49cce3416e103b4fe7a47e65231 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:06 +0600
Subject: [PATCH 2/7] lilv: update to 0.24.24.

---
 srcpkgs/lilv/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/lilv/template b/srcpkgs/lilv/template
index 57f4bc30b9501b..bf03429f42c1e9 100644
--- a/srcpkgs/lilv/template
+++ b/srcpkgs/lilv/template
@@ -1,18 +1,18 @@
 # Template file for 'lilv'
 pkgname=lilv
-version=0.24.12
-revision=4
-build_style=waf3
-configure_args="--dyn-manifest"
+version=0.24.24
+revision=1
+build_style=meson
 hostmakedepends="pkg-config"
 makedepends="python3-devel serd-devel sord-devel sratom-devel libsndfile-devel
  lv2"
 short_desc="Simple yet powerful C API for using LV2 plugins"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="ISC"
-homepage="http://drobilla.net/software/lilv/"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=26a37790890c9c1f838203b47f5b2320334fe92c02a4d26ebbe2669dbd769061
+homepage="https://drobilla.net/software/lilv.html"
+changelog="https://raw.githubusercontent.com/lv2/lilv/master/NEWS"
+distfiles="https://download.drobilla.net/lilv-${version}.tar.xz"
+checksum=6bb6be9f88504176d0642f12de809b2b9e2dc55621a68adb8c7edb99aefabb4f
 
 post_install() {
 	vlicense COPYING
@@ -31,7 +31,8 @@ lilv-bash-completion_package() {
 	depends="bash-completion lilv"
 	short_desc+=" - Bash completion for Lilv"
 	pkg_install() {
-		vcompletion utils/lilv.bash_completion bash
+		vcompletion ${DESTDIR}/etc/bash_completion.d/lilv bash
+		rm -r ${DESTDIR}/etc
 	}
 }
 

From c71bb7e1874a70f752f7a492d87d84a52e98e486 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:14 +0600
Subject: [PATCH 3/7] portaudio: update to 190700.20210406.

---
 .../portaudio/patches/audacity-compat.patch   | 344 -------
 srcpkgs/portaudio/patches/sndio.patch         | 883 ------------------
 srcpkgs/portaudio/template                    |  18 +-
 3 files changed, 7 insertions(+), 1238 deletions(-)
 delete mode 100644 srcpkgs/portaudio/patches/audacity-compat.patch
 delete mode 100644 srcpkgs/portaudio/patches/sndio.patch

diff --git a/srcpkgs/portaudio/patches/audacity-compat.patch b/srcpkgs/portaudio/patches/audacity-compat.patch
deleted file mode 100644
index eb89f0a6346db2..00000000000000
--- a/srcpkgs/portaudio/patches/audacity-compat.patch
+++ /dev/null
@@ -1,344 +0,0 @@
-Source: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/portaudio-audacity-compat.patch
-Upstream: No
-Reason: Audacity needs Pa_GetStreamHostApiType to use system wide portaudio
-
-
-diff --git a/configure.in b/configure.in
-index 13816fb..83c239a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -420,6 +420,7 @@ case "${host_os}" in
-                    DLL_LIBS="$DLL_LIBS -lossaudio"
-                    LIBS="$LIBS -lossaudio"
-            fi
-+           INCLUDES="$INCLUDES pa_unix_oss.h"
-            AC_DEFINE(PA_USE_OSS,1)
-         fi
- 
-diff --git a/include/pa_unix_oss.h b/include/pa_unix_oss.h
-new file mode 100644
-index 0000000..64e04cb
---- /dev/null
-+++ b/include/pa_unix_oss.h
-@@ -0,0 +1,104 @@
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-diff --git a/include/pa_win_ds.h b/include/pa_win_ds.h
-index 5d38641..ba1c245 100644
---- a/include/pa_win_ds.h
-+++ b/include/pa_win_ds.h
-@@ -86,6 +86,21 @@ typedef struct PaWinDirectSoundStreamInfo{
- 
- }PaWinDirectSoundStreamInfo;
- 
-+/** Retrieve the GUID of the input device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
-+
-+/** Retrieve the GUID of the output device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
- 
- 
- #ifdef __cplusplus
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 8a94aaf..9c8a295 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -1197,6 +1197,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* stream );
- signed long Pa_GetStreamWriteAvailable( PaStream* stream );
- 
- 
-+/** Retrieve the host type handling an open stream.
-+
-+ @return Returns a non-negative value representing the host API type
-+ handling an open stream or, a PaErrorCode (which are always negative)
-+ if PortAudio is not initialized or an error is encountered.
-+*/
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
-+
-+
- /* Miscellaneous utilities */
- 
- 
-diff --git a/src/common/pa_front.c b/src/common/pa_front.c
-index 188cee9..52f44a6 100644
---- a/src/common/pa_front.c
-+++ b/src/common/pa_front.c
-@@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream,
-                                   hostApiInputParametersPtr, hostApiOutputParametersPtr,
-                                   sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
- 
--    if( result == paNoError )
-+    if( result == paNoError ) {
-         AddOpenStream( *stream );
-+        PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
-+    }
- 
- 
-     PA_LOGAPI(("Pa_OpenStream returned:\n" ));
-@@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream )
-     return result;
- }
- 
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
-+{
-+    PaError error = PaUtil_ValidateStreamPointer( stream );
-+    PaHostApiTypeId result;
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
-+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
-+#endif
-+
-+    if( error == paNoError )
-+    {
-+        result = PA_STREAM_REP(stream)->hostApiType;
-+    }
-+    else
-+    {
-+        result = (PaHostApiTypeId) error;
-+    }
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
-+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
-+#endif
-+
-+    return result;
-+}
- 
- PaError Pa_GetSampleSize( PaSampleFormat format )
- {
-diff --git a/src/common/pa_stream.c b/src/common/pa_stream.c
-index 03a0ee6..c4376f9 100644
---- a/src/common/pa_stream.c
-+++ b/src/common/pa_stream.c
-@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe
-     streamRepresentation->streamInfo.inputLatency = 0.;
-     streamRepresentation->streamInfo.outputLatency = 0.;
-     streamRepresentation->streamInfo.sampleRate = 0.;
-+
-+    streamRepresentation->hostApiType = 0;
- }
- 
- 
-diff --git a/src/common/pa_stream.h b/src/common/pa_stream.h
-index 678e2ad..70572c7 100644
---- a/src/common/pa_stream.h
-+++ b/src/common/pa_stream.h
-@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation {
-     PaStreamFinishedCallback *streamFinishedCallback;
-     void *userData;
-     PaStreamInfo streamInfo;
-+    PaHostApiTypeId hostApiType;
- } PaUtilStreamRepresentation;
- 
- 
-diff --git a/src/hostapi/alsa/pa_linux_alsa.c b/src/hostapi/alsa/pa_linux_alsa.c
-index 584cde8..558fb3d 100644
---- a/src/hostapi/alsa/pa_linux_alsa.c
-+++ b/src/hostapi/alsa/pa_linux_alsa.c
-@@ -621,6 +621,7 @@ typedef struct
-     StreamDirection streamDir;
- 
-     snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */
-+    int card;
- } PaAlsaStreamComponent;
- 
- /* Implementation specific stream structure */
-@@ -1873,6 +1874,7 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
- {
-     PaError result = paNoError;
-     PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError;
-+    snd_pcm_info_t* pcmInfo;
-     assert( params->channelCount > 0 );
- 
-     /* Make sure things have an initial value */
-@@ -1900,6 +1902,9 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
-     self->device = params->device;
- 
-     PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) );
-+
-+    snd_pcm_info_alloca( &pcmInfo );
-+    self->card = snd_pcm_info_get_card( pcmInfo );
-     self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm );
- 
-     PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) );
-@@ -4605,9 +4610,7 @@ PaError PaAlsa_GetStreamInputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->capture.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->capture.card;
- 
- error:
-     return result;
-@@ -4624,9 +4627,7 @@ PaError PaAlsa_GetStreamOutputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->playback.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->playback.card;
- 
- error:
-     return result;
-diff --git a/src/hostapi/coreaudio/pa_mac_core_blocking.c b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-index 679c6ba..a69e085 100644
---- a/src/hostapi/coreaudio/pa_mac_core_blocking.c
-+++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-@@ -66,6 +66,9 @@
- #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
- # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
- # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
-+#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
-+# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
-+# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
- #else
- # include <libkern/OSAtomic.h>
- #endif
-diff --git a/src/hostapi/oss/pa_unix_oss.c b/src/hostapi/oss/pa_unix_oss.c
-index 51e9630..f257d80 100644
---- a/src/hostapi/oss/pa_unix_oss.c
-+++ b/src/hostapi/oss/pa_unix_oss.c
-@@ -2043,3 +2043,26 @@ error:
- #endif
- }
- 
-+const char *PaOSS_GetStreamInputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->capture )
-+    {
-+      return stream->capture->devName;
-+    }
-+
-+   return NULL;
-+}
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->playback )
-+    {
-+      return stream->playback->devName;
-+    }
-+
-+   return NULL;
-+}
diff --git a/srcpkgs/portaudio/patches/sndio.patch b/srcpkgs/portaudio/patches/sndio.patch
deleted file mode 100644
index 9fc20960d58622..00000000000000
--- a/srcpkgs/portaudio/patches/sndio.patch
+++ /dev/null
@@ -1,883 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 5e1a764..2747f73 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -44,7 +44,7 @@ PALIB = libportaudio.la
- PAINC = include/portaudio.h
- 
- PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \
--	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \
-+	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS|PaSndio)_.*" \
- 	     -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
- 
- COMMON_OBJS = \
-@@ -146,6 +146,7 @@ SRC_DIRS = \
- 	src/hostapi/dsound \
- 	src/hostapi/jack \
- 	src/hostapi/oss \
-+	src/hostapi/sndio \
- 	src/hostapi/wasapi \
- 	src/hostapi/wdmks \
- 	src/hostapi/wmme \
-diff --git a/configure.in b/configure.in
-index 83c239a..db11d65 100644
---- a/configure.in
-+++ b/configure.in
-@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
-             AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
-             [with_alsa=$withval])
- 
-+AC_ARG_WITH(sndio,
-+            AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
-+            [with_sndio=$withval])
-+
- AC_ARG_WITH(jack,
-             AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
-             [with_jack=$withval])
-@@ -120,6 +124,10 @@ have_alsa=no
- if test "x$with_alsa" != "xno"; then
-     AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
- fi
-+have_sndio=no
-+if test "x$with_sndio" != "xno"; then
-+    AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
-+fi
- have_asihpi=no
- if test "x$with_asihpi" != "xno"; then
-     AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
-@@ -406,6 +414,13 @@ case "${host_os}" in
-            AC_DEFINE(PA_USE_ALSA,1)
-         fi
- 
-+        if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
-+            DLL_LIBS="$DLL_LIBS -lsndio"
-+            LIBS="$LIBS -lsndio"
-+            OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
-+            AC_DEFINE(PA_USE_SNDIO,1)
-+        fi
-+
-         if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
-            DLL_LIBS="$DLL_LIBS $JACK_LIBS"
-            CFLAGS="$CFLAGS $JACK_CFLAGS"
-@@ -510,6 +525,7 @@ case "$target_os" in
-         ;;
-      *)
- 	AC_MSG_RESULT([
-+  Sndio ....................... $have_sndio
-   OSS ......................... $have_oss
-   JACK ........................ $have_jack
- ])
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 9c8a295..e535a02 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
-     paWDMKS=11,
-     paJACK=12,
-     paWASAPI=13,
--    paAudioScienceHPI=14
-+    paAudioScienceHPI=14,
-+    paSndio=15
- } PaHostApiTypeId;
- 
- 
-diff --git a/src/hostapi/sndio/pa_sndio.c b/src/hostapi/sndio/pa_sndio.c
-new file mode 100644
-index 0000000..725ef47
---- /dev/null
-+++ b/src/hostapi/sndio/pa_sndio.c
-@@ -0,0 +1,768 @@
-+/*
-+ * Copyright (c) 2009 Alexandre Ratchov <alex@caoua.org>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+#include <sys/types.h>
-+#include <pthread.h>
-+#include <poll.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <sndio.h>
-+
-+#include "pa_util.h"
-+#include "pa_hostapi.h"
-+#include "pa_stream.h"
-+#include "pa_process.h"
-+#include "pa_allocation.h"
-+
-+#if 0
-+#define DPR(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
-+#else
-+#define DPR(...) do {} while (0)
-+#endif
-+
-+/*
-+ * per-stream data
-+ */
-+typedef struct PaSndioStream
-+{
-+	PaUtilStreamRepresentation base;
-+	PaUtilBufferProcessor bufproc;	/* format conversion */
-+	struct sio_hdl *hdl;		/* handle for device i/o */
-+	struct sio_par par;		/* current device parameters */	
-+	unsigned mode;			/* SIO_PLAY, SIO_REC or both */
-+	int stopped;			/* stop requested or not started */
-+	int active;			/* thread is running */
-+	unsigned long long realpos;	/* frame number h/w is processing */
-+	char *rbuf, *wbuf;		/* bounce buffers for conversions */
-+	unsigned long long rpos, wpos;	/* bytes read/written */
-+	pthread_t thread;		/* thread of the callback interface */
-+} PaSndioStream;
-+
-+/*
-+ * api "class" data, common to all streams
-+ */
-+typedef struct PaSndioHostApiRepresentation
-+{
-+	PaUtilHostApiRepresentation base;
-+	PaUtilStreamInterface callback;
-+	PaUtilStreamInterface blocking;
-+	/*
-+	 * sndio has no device discovery mechanism and PortAudio has
-+	 * no way of accepting raw device strings from users.
-+	 * Normally we just expose the default device, which can be
-+	 * changed via the AUDIODEVICE environment variable, but we
-+	 * also allow specifying a list of up to 16 devices via the
-+	 * PA_SNDIO_AUDIODEVICES environment variable.
-+	 *
-+	 * Example:
-+	 * PA_SNDIO_AUDIODEVICES=default:snd/0.monitor:snd@remote/0
-+	 */
-+#define PA_SNDIO_AUDIODEVICES_MAX	16
-+	PaDeviceInfo device_info[PA_SNDIO_AUDIODEVICES_MAX];
-+	PaDeviceInfo *infos[PA_SNDIO_AUDIODEVICES_MAX];
-+	char *audiodevices;
-+} PaSndioHostApiRepresentation;
-+
-+/*
-+ * callback invoked when blocks are processed by the hardware
-+ */
-+static void
-+sndioOnMove(void *addr, int delta)
-+{
-+	PaSndioStream *s = (PaSndioStream *)addr;
-+
-+	s->realpos += delta;
-+}
-+
-+/*
-+ * convert PA encoding to sndio encoding, return true on success
-+ */
-+static int
-+sndioSetFmt(struct sio_par *sio, PaSampleFormat fmt)
-+{
-+	switch (fmt & ~paNonInterleaved) {
-+	case paInt32:
-+		sio->sig = 1;
-+		sio->bits = 32;
-+		break;
-+	case paInt24:
-+		sio->sig = 1;
-+		sio->bits = 24;
-+		sio->bps = 3;	/* paInt24 is packed format */
-+		break;
-+	case paInt16:
-+	case paFloat32:
-+		sio->sig = 1;
-+		sio->bits = 16;
-+		break;
-+	case paInt8:
-+		sio->sig = 1;
-+		sio->bits = 8;
-+		break;
-+	case paUInt8:
-+		sio->sig = 0;
-+		sio->bits = 8;
-+		break;
-+	default:
-+		DPR("sndioSetFmt: %x: unsupported\n", fmt);
-+		return 0;
-+	}
-+	sio->le = SIO_LE_NATIVE;
-+	return 1;
-+}
-+
-+/*
-+ * convert sndio encoding to PA encoding, return true on success
-+ */
-+static int
-+sndioGetFmt(struct sio_par *sio, PaSampleFormat *fmt)
-+{
-+	if ((sio->bps * 8 != sio->bits && !sio->msb) ||
-+	    (sio->bps > 1 && sio->le != SIO_LE_NATIVE)) {
-+		DPR("sndioGetFmt: bits = %u, le = %u, msb = %u, bps = %u\n",
-+		    sio->bits, sio->le, sio->msb, sio->bps);
-+		return 0;
-+	}
-+
-+	switch (sio->bits) {
-+	case 32:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt32;
-+		break;
-+	case 24:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = (sio->bps == 3) ? paInt24 : paInt32;
-+		break;
-+	case 16:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt16;
-+		break;
-+	case 8:
-+		*fmt = sio->sig ? paInt8 : paUInt8;
-+		break;
-+	default:
-+		DPR("sndioGetFmt: %u: unsupported\n", sio->bits);
-+		return 0;
-+	}
-+	return 1;
-+}
-+
-+/*
-+ * I/O loop for callback interface
-+ */
-+static void *
-+sndioThread(void *arg)
-+{
-+	PaSndioStream *s = (PaSndioStream *)arg;
-+	PaStreamCallbackTimeInfo ti;
-+	unsigned char *data;
-+	unsigned todo, rblksz, wblksz;
-+	int n, result;
-+	
-+	rblksz = s->par.round * s->par.rchan * s->par.bps;
-+	wblksz = s->par.round * s->par.pchan * s->par.bps;
-+	
-+	DPR("sndioThread: mode = %x, round = %u, rblksz = %u, wblksz = %u\n",
-+	    s->mode, s->par.round, rblksz, wblksz);
-+	
-+	while (!s->stopped) {
-+		if (s->mode & SIO_REC) {
-+			todo = rblksz;
-+			data = s->rbuf;
-+			while (todo > 0) {
-+				n = sio_read(s->hdl, data, todo);
-+				if (n == 0) {
-+					DPR("sndioThread: sio_read failed\n");
-+					goto failed;
-+				}
-+				todo -= n;
-+				data += n;
-+			}
-+			s->rpos += s->par.round;
-+			ti.inputBufferAdcTime = 
-+			    (double)s->realpos / s->par.rate;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			ti.outputBufferDacTime =
-+			    (double)(s->realpos + s->par.bufsz) / s->par.rate;
-+		}
-+		ti.currentTime = s->realpos / (double)s->par.rate;
-+		PaUtil_BeginBufferProcessing(&s->bufproc, &ti, 0);
-+		if (s->mode & SIO_PLAY) {
-+			PaUtil_SetOutputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedOutputChannels(&s->bufproc,
-+			    0, s->wbuf, s->par.pchan);
-+		}
-+		if (s->mode & SIO_REC) {
-+			PaUtil_SetInputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedInputChannels(&s->bufproc,
-+			    0, s->rbuf, s->par.rchan);
-+		}
-+		result = paContinue;
-+		n = PaUtil_EndBufferProcessing(&s->bufproc, &result);
-+		if (n != s->par.round) {
-+			DPR("sndioThread: %d < %u frames, result = %d\n",
-+			    n, s->par.round, result);
-+		}
-+		if (result != paContinue) {
-+			break;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			n = sio_write(s->hdl, s->wbuf, wblksz);
-+			if (n < wblksz) {
-+				DPR("sndioThread: sio_write failed\n");
-+				goto failed;
-+			}
-+			s->wpos += s->par.round;
-+		}
-+	}
-+ failed:
-+	s->active = 0;
-+	DPR("sndioThread: done\n");
-+}
-+
-+static PaError
-+OpenStream(struct PaUtilHostApiRepresentation *hostApi,
-+    PaStream **stream,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate,
-+    unsigned long framesPerBuffer,
-+    PaStreamFlags streamFlags,
-+    PaStreamCallback *streamCallback,
-+    void *userData)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	PaSndioStream *s;
-+	PaError err;
-+	struct sio_hdl *hdl;
-+	struct sio_par par;
-+	unsigned mode;
-+	int inch, onch;
-+	PaSampleFormat ifmt, ofmt, siofmt;
-+	const char *dev;
-+
-+	DPR("OpenStream:\n");
-+
-+	mode = 0;
-+	inch = onch = 0;
-+	ifmt = ofmt = 0;
-+	sio_initpar(&par);
-+
-+	if (outputPar && outputPar->channelCount > 0) {
-+		if (outputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad output device\n", outputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (outputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: output specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, outputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ofmt = outputPar->sampleFormat;
-+		onch = par.pchan = outputPar->channelCount;
-+		mode |= SIO_PLAY;
-+	}
-+	if (inputPar && inputPar->channelCount > 0) {
-+		if (inputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad input device\n", inputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (inputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: input specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, inputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ifmt = inputPar->sampleFormat;
-+		inch = par.rchan = inputPar->channelCount;
-+		mode |= SIO_REC;
-+	}
-+	par.rate = sampleRate;
-+	if (framesPerBuffer != paFramesPerBufferUnspecified)
-+		par.round = framesPerBuffer;
-+
-+	DPR("OpenStream: mode = %x, trying rate = %u\n", mode, par.rate);
-+
-+	if (outputPar) {
-+		dev = sndioHostApi->device_info[outputPar->device].name;
-+	} else if (inputPar) {
-+		dev = sndioHostApi->device_info[inputPar->device].name;
-+	} else {
-+		return paUnanticipatedHostError;
-+	}
-+	hdl = sio_open(dev, mode, 0);
-+	if (hdl == NULL)
-+		return paUnanticipatedHostError;
-+	if (!sio_setpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sio_getpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sndioGetFmt(&par, &siofmt)) {
-+		sio_close(hdl);
-+		return paSampleFormatNotSupported;
-+	}
-+	if ((mode & SIO_REC) && par.rchan != inputPar->channelCount) {
-+		DPR("OpenStream: rchan(%u) != %d\n", par.rchan, inputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((mode & SIO_PLAY) && par.pchan != outputPar->channelCount) {
-+		DPR("OpenStream: pchan(%u) != %d\n", par.pchan, outputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((double)par.rate < sampleRate * 0.995 ||
-+	    (double)par.rate > sampleRate * 1.005) {
-+		DPR("OpenStream: rate(%u) != %g\n", par.rate, sampleRate);
-+		sio_close(hdl);
-+		return paInvalidSampleRate;
-+	}
-+	
-+	s = (PaSndioStream *)PaUtil_AllocateMemory(sizeof(PaSndioStream));
-+	if (s == NULL) {
-+		sio_close(hdl);
-+		return paInsufficientMemory;
-+	}
-+	PaUtil_InitializeStreamRepresentation(&s->base, 
-+	    streamCallback ? &sndioHostApi->callback : &sndioHostApi->blocking,
-+	    streamCallback, userData);
-+	DPR("inch = %d, onch = %d, ifmt = %x, ofmt = %x\n", 
-+	    inch, onch, ifmt, ofmt);
-+	err = PaUtil_InitializeBufferProcessor(&s->bufproc,
-+	    inch, ifmt, siofmt,
-+	    onch, ofmt, siofmt,
-+	    sampleRate,
-+	    streamFlags,
-+	    framesPerBuffer,
-+	    par.round,
-+	    paUtilFixedHostBufferSize, 
-+	    streamCallback, userData);
-+	if (err) {
-+		DPR("OpenStream: PaUtil_InitializeBufferProcessor failed\n");
-+		PaUtil_FreeMemory(s);
-+		sio_close(hdl);
-+		return err;
-+	}
-+	if (mode & SIO_REC) {
-+		s->rbuf = malloc(par.round * par.rchan * par.bps);
-+		if (s->rbuf == NULL) {
-+			DPR("OpenStream: failed to allocate rbuf\n");
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}
-+	if (mode & SIO_PLAY) {
-+		s->wbuf = malloc(par.round * par.pchan * par.bps);
-+		if (s->wbuf == NULL) {
-+			DPR("OpenStream: failed to allocate wbuf\n");
-+			free(s->rbuf);
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}	
-+	s->base.streamInfo.inputLatency = 0;
-+	s->base.streamInfo.outputLatency = (mode & SIO_PLAY) ?
-+	    (double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatencyFrames(&s->bufproc)) / (double)par.rate : 0;
-+	s->base.streamInfo.sampleRate = par.rate;
-+	s->active = 0;
-+	s->stopped = 1;
-+	s->mode = mode;
-+	s->hdl = hdl;
-+	s->par = par;
-+	*stream = s;	
-+	DPR("OpenStream: done\n");
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingReadStream(PaStream *stream, void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res, todo;
-+	void *buf;
-+	
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		buf = s->rbuf;
-+		todo = n * s->par.rchan * s->par.bps;
-+		while (todo > 0) {
-+			res = sio_read(s->hdl, buf, todo);
-+			if (res == 0)
-+				return paUnanticipatedHostError;
-+			buf = (char *)buf + res;
-+			todo -= res;
-+		}
-+		s->rpos += n;
-+		PaUtil_SetInputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedInputChannels(&s->bufproc, 0, s->rbuf, s->par.rchan);
-+		res = PaUtil_CopyInput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingReadStream: copyInput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingWriteStream(PaStream* stream, const void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res;
-+
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		PaUtil_SetOutputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedOutputChannels(&s->bufproc, 0, s->wbuf, s->par.pchan);
-+		res = PaUtil_CopyOutput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingWriteStream: copyOutput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		res = sio_write(s->hdl, s->wbuf, n * s->par.pchan * s->par.bps);
-+		if (res == 0)
-+			return paUnanticipatedHostError;		
-+		s->wpos += n;
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static signed long
-+BlockingGetStreamReadAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLIN);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLIN))
-+		return 0;
-+
-+	return s->realpos - s->rpos;
-+}
-+
-+static signed long
-+BlockingGetStreamWriteAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLOUT);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLOUT))
-+		return 0;
-+
-+	return s->par.bufsz - (s->wpos - s->realpos);
-+}
-+
-+static PaError
-+BlockingWaitEmpty( PaStream *stream )
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	/*
-+	 * drain playback buffers; sndio always does it in background
-+	 * and there is no way to wait for completion
-+	 */
-+	DPR("BlockingWaitEmpty: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return paNoError;
-+}
-+
-+static PaError
-+StartStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned primes, wblksz;
-+	int err;
-+
-+	DPR("StartStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (!s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 0;
-+	s->active = 1;
-+	s->realpos = 0;
-+	s->wpos = 0;
-+	s->rpos = 0;
-+	PaUtil_ResetBufferProcessor(&s->bufproc);
-+	if (!sio_start(s->hdl))
-+		return paUnanticipatedHostError;
-+
-+	/*
-+	 * send a complete buffer of silence
-+	 */
-+	if (s->mode & SIO_PLAY) {
-+		wblksz = s->par.round * s->par.pchan * s->par.bps;
-+		memset(s->wbuf, 0, wblksz);
-+		for (primes = s->par.bufsz / s->par.round; primes > 0; primes--)
-+			s->wpos += sio_write(s->hdl, s->wbuf, wblksz);
-+	}
-+	if (s->base.streamCallback) {
-+		err = pthread_create(&s->thread, NULL, sndioThread, s);
-+		if (err) {
-+			DPR("SndioStartStream: couldn't create thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+		DPR("StartStream: started...\n");
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+StopStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	void *ret;
-+	int err;
-+
-+	DPR("StopStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 1;
-+	if (s->base.streamCallback) {
-+		err = pthread_join(s->thread, &ret);
-+		if (err) {
-+			DPR("SndioStop: couldn't join thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+	}
-+	if (!sio_stop(s->hdl))
-+		return paUnanticipatedHostError;
-+	return paNoError;
-+}
-+
-+static PaError
-+CloseStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	DPR("CloseStream:\n");
-+
-+	if (!s->stopped)
-+		StopStream(stream);
-+
-+	if (s->mode & SIO_REC)
-+		free(s->rbuf);
-+	if (s->mode & SIO_PLAY)
-+		free(s->wbuf);
-+	sio_close(s->hdl);
-+        PaUtil_TerminateStreamRepresentation(&s->base);
-+	PaUtil_TerminateBufferProcessor(&s->bufproc);
-+	PaUtil_FreeMemory(s);
-+	return paNoError;
-+}
-+
-+static PaError
-+AbortStream(PaStream *stream)
-+{
-+	DPR("AbortStream:\n");
-+
-+	return StopStream(stream);
-+}
-+
-+static PaError
-+IsStreamStopped(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamStopped: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->stopped;
-+}
-+
-+static PaError
-+IsStreamActive(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamActive: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->active;
-+}
-+
-+static PaTime
-+GetStreamTime(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	return (double)s->realpos / s->base.streamInfo.sampleRate;
-+}
-+
-+static PaError
-+IsFormatSupported(struct PaUtilHostApiRepresentation *hostApi,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate)
-+{
-+	return paFormatIsSupported;
-+}
-+
-+static void
-+Terminate(struct PaUtilHostApiRepresentation *hostApi)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	free(sndioHostApi->audiodevices);
-+	PaUtil_FreeMemory(hostApi);
-+}
-+
-+static void
-+InitDeviceInfo(PaDeviceInfo *info, PaHostApiIndex hostApiIndex, const char *name)
-+{
-+	info->structVersion = 2;
-+	info->name = name;
-+	info->hostApi = hostApiIndex;
-+	info->maxInputChannels = 128;
-+	info->maxOutputChannels = 128;
-+	info->defaultLowInputLatency = 0.01;
-+	info->defaultLowOutputLatency = 0.01;
-+	info->defaultHighInputLatency = 0.5;
-+	info->defaultHighOutputLatency = 0.5;
-+	info->defaultSampleRate = 48000;
-+}
-+
-+PaError
-+PaSndio_Initialize(PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	PaDeviceInfo *info;
-+	struct sio_hdl *hdl;
-+	char *audiodevices;
-+	char *device;
-+	size_t deviceCount;
-+
-+	DPR("PaSndio_Initialize: initializing...\n");
-+
-+	if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) == NULL)
-+		return paNoError;
-+	sio_close(hdl);
-+	/* unusable APIs should return paNoError and a NULL hostApi */
-+	*hostApi = NULL;
-+
-+	sndioHostApi = PaUtil_AllocateMemory(sizeof(PaSndioHostApiRepresentation));
-+	if (sndioHostApi == NULL)
-+		return paNoError;
-+
-+	// Add default device
-+	info = &sndioHostApi->device_info[0];
-+	InitDeviceInfo(info, hostApiIndex, SIO_DEVANY);
-+	sndioHostApi->infos[0] = info;
-+	deviceCount = 1;
-+
-+	// Add additional devices as specified in the PA_SNDIO_AUDIODEVICES
-+	// environment variable as a colon separated list
-+	sndioHostApi->audiodevices = NULL;
-+	audiodevices = getenv("PA_SNDIO_AUDIODEVICES");
-+	if (audiodevices != NULL) {
-+		sndioHostApi->audiodevices = strdup(audiodevices);
-+		if (sndioHostApi->audiodevices == NULL)
-+			return paNoError;
-+
-+		audiodevices = sndioHostApi->audiodevices;
-+		while ((device = strsep(&audiodevices, ":")) != NULL &&
-+			deviceCount < PA_SNDIO_AUDIODEVICES_MAX) {
-+			if (*device == '\0')
-+				continue;
-+			info = &sndioHostApi->device_info[deviceCount];
-+			InitDeviceInfo(info, hostApiIndex, device);
-+			sndioHostApi->infos[deviceCount] = info;
-+			deviceCount++;
-+		}
-+	}
-+
-+	*hostApi = &sndioHostApi->base;
-+	(*hostApi)->info.structVersion = 1;
-+	(*hostApi)->info.type = paSndio;
-+	(*hostApi)->info.name = "sndio";
-+	(*hostApi)->info.deviceCount = deviceCount;
-+	(*hostApi)->info.defaultInputDevice = 0;
-+	(*hostApi)->info.defaultOutputDevice = 0;
-+	(*hostApi)->deviceInfos = sndioHostApi->infos;
-+	(*hostApi)->Terminate = Terminate;
-+	(*hostApi)->OpenStream = OpenStream;
-+	(*hostApi)->IsFormatSupported = IsFormatSupported;
-+	
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->blocking,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    BlockingReadStream,
-+	    BlockingWriteStream,
-+	    BlockingGetStreamReadAvailable,
-+	    BlockingGetStreamWriteAvailable);
-+
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->callback,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    PaUtil_DummyRead,
-+	    PaUtil_DummyWrite,
-+	    PaUtil_DummyGetReadAvailable,
-+	    PaUtil_DummyGetWriteAvailable);
-+
-+	DPR("PaSndio_Initialize: done\n");
-+	return paNoError;
-+}
-diff --git a/src/os/unix/pa_unix_hostapis.c b/src/os/unix/pa_unix_hostapis.c
-index a9b4a05..f10ced1 100644
---- a/src/os/unix/pa_unix_hostapis.c
-+++ b/src/os/unix/pa_unix_hostapis.c
-@@ -44,6 +44,7 @@
- 
- PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-+PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- /* Added for IRIX, Pieter, oct 2, 2003: */
- PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-@@ -57,6 +58,10 @@ PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiI
- 
- PaUtilHostApiInitializer *paHostApiInitializers[] =
-     {
-+#ifdef PA_USE_SNDIO
-+	    PaSndio_Initialize,
-+#endif
-+
- #ifdef __linux__
- 
- #if PA_USE_ALSA
--- 
-2.27.0
-
diff --git a/srcpkgs/portaudio/template b/srcpkgs/portaudio/template
index 54dcd9a7215504..fe087e9f24f16c 100644
--- a/srcpkgs/portaudio/template
+++ b/srcpkgs/portaudio/template
@@ -1,23 +1,19 @@
 # Template file for 'portaudio'
 pkgname=portaudio
-version=190600.20161030
-revision=6
+version=190700.20210406
+revision=1
 build_style=gnu-configure
-configure_args="--enable-cxx --with-jack $(vopt_enable sndio)"
+configure_args="--enable-cxx --with-jack --with-sndio"
 hostmakedepends="pkg-config"
-makedepends="alsa-lib-devel jack-devel $(vopt_if sndio sndio-devel)"
+makedepends="alsa-lib-devel jack-devel sndio-devel"
 short_desc="Portable cross-platform audio I/O library"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="http://www.portaudio.com"
-distfiles="http://www.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
-checksum=f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513
+homepage="https://www.portaudio.com"
+distfiles="https://files.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
+checksum=47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def
 disable_parallel_build=yes
 
-# sndio disabled by default: non-upstream patch
-build_options="sndio"
-build_options_default=""
-
 post_install() {
 	vlicense LICENSE.txt
 }

From 8b19e4bde671028f6ff07844d028e176ba6b030f Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:22 +0600
Subject: [PATCH 4/7] soundtouch: update to 2.3.3.

---
 srcpkgs/soundtouch/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/soundtouch/template b/srcpkgs/soundtouch/template
index f9a7c06bee7a36..c56273fbb79264 100644
--- a/srcpkgs/soundtouch/template
+++ b/srcpkgs/soundtouch/template
@@ -1,6 +1,6 @@
 # Template file for 'soundtouch'
 pkgname=soundtouch
-version=2.3.2
+version=2.3.3
 revision=1
 build_style=gnu-configure
 configure_args="--enable-openmp"
@@ -11,7 +11,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="LGPL-2.1-only"
 homepage="https://www.surina.net/soundtouch"
 distfiles="https://www.surina.net/soundtouch/soundtouch-${version}.tar.gz"
-checksum=3bde8ddbbc3661f04e151f72cf21ca9d8f8c88e265833b65935b8962d12d6b08
+checksum=43b23dfac2f64a3aff55d64be096ffc7b73842c3f5665caff44975633a975a99
 
 pre_configure() {
 	./bootstrap

From 450ba3e0e0a6e16b2f1b3480f17b2a2dc01d8789 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:27 +0600
Subject: [PATCH 5/7] sqlite: update to 3.45.3.

---
 srcpkgs/sqlite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sqlite/template b/srcpkgs/sqlite/template
index 1d548eb479560b..4ae8fd4d281465 100644
--- a/srcpkgs/sqlite/template
+++ b/srcpkgs/sqlite/template
@@ -1,6 +1,6 @@
 # Template file for 'sqlite'
 pkgname=sqlite
-version=3.45.2
+version=3.45.3
 revision=1
 _amalgamationver=$(printf "%d%02d%02d00\n" ${version//./ })
 build_style=gnu-configure
@@ -12,7 +12,7 @@ license="Public Domain"
 homepage="https://sqlite.org/"
 changelog="https://www.sqlite.org/changes.html"
 distfiles="https://sqlite.org/2024/sqlite-autoconf-${_amalgamationver}.tar.gz"
-checksum=bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae
+checksum=b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531
 
 CFLAGS="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE \

From cdb939ecf2516f8b696194ad10da3d7d1d7d95c9 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:32 +0600
Subject: [PATCH 6/7] suil: update to 0.10.20.

---
 srcpkgs/suil/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/suil/template b/srcpkgs/suil/template
index 680e1972cd4371..58d7d4aceee052 100644
--- a/srcpkgs/suil/template
+++ b/srcpkgs/suil/template
@@ -1,8 +1,8 @@
 # Template file for 'suil'
 pkgname=suil
-version=0.10.12
+version=0.10.20
 revision=1
-build_style=waf3
+build_style=meson
 hostmakedepends="pkg-config lv2"
 makedepends="gtk+-devel qt5-devel gtk+3-devel"
 short_desc="Lightweight C library for loading and wrapping LV2 plugin UIs"
@@ -10,8 +10,8 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://drobilla.net/software/suil.html"
 changelog="https://gitlab.com/lv2/suil/-/raw/master/NEWS"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=daa763b231b22a1f532530d3e04c1fae48d1e1e03785e23c9ac138f207b87ecd
+distfiles="https://download.drobilla.net/suil-${version}.tar.xz"
+checksum=334a3ed3e73d5e17ff400b3db9801f63809155b0faa8b1b9046f9dd3ffef934e
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-host-tools qt5-devel"

From 9baafe07bbed629eb3789172fbd2c43569c522df Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:39 +0600
Subject: [PATCH 7/7] wavpack: update to 5.7.0.

---
 srcpkgs/wavpack/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wavpack/template b/srcpkgs/wavpack/template
index d9b0f68f014bda..c6c65770f0d7fc 100644
--- a/srcpkgs/wavpack/template
+++ b/srcpkgs/wavpack/template
@@ -1,6 +1,6 @@
 # Template file for 'wavpack'
 pkgname=wavpack
-version=5.6.0
+version=5.7.0
 revision=1
 build_style=gnu-configure
 configure_args="--enable-static"
@@ -10,7 +10,7 @@ license="BSD-3-Clause"
 homepage="https://www.wavpack.com/"
 changelog="https://raw.githubusercontent.com/dbry/WavPack/master/NEWS"
 distfiles="https://www.wavpack.com/wavpack-${version}.tar.bz2"
-checksum=8cbfa15927d29bcf953db35c0cfca7424344ff43ebe4083daf161577fb839cc1
+checksum=8944b237968a1b3976a1eb47cd556916e041a2aa8917495db65f82c3fcc2a225
 
 case "$XBPS_TARGET_MACHINE" in
 	armv5*) configure_args+=" --disable-asm";;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] audacity: update to 3.5.1. Update audacity and deps
  2024-04-26 17:50 [PR PATCH] audacity: update to 3.5.1. Update audacity and deps iFoundSilentHouse
  2024-04-26 18:08 ` [PR PATCH] [Updated] [WIP] " iFoundSilentHouse
  2024-04-26 18:12 ` iFoundSilentHouse
@ 2024-04-26 19:17 ` iFoundSilentHouse
  2024-04-26 22:14 ` iFoundSilentHouse
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: iFoundSilentHouse @ 2024-04-26 19:17 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

There is an updated pull request by iFoundSilentHouse against master on the void-packages repository

https://github.com/iFoundSilentHouse/void-packages audacity-3.5
https://github.com/void-linux/void-packages/pull/50047

[WIP] audacity: update to 3.5.1. Update audacity and deps
- I tested the changes in this PR: **YES**
- I built this PR locally for my native architecture, (x86_64-glibc)

Lilv dyn-manifest change: https://github.com/lv2/lilv/commit/17f6705ae6d0e8c7202f598f5271786a00a065be
Portaudio patches: https://github.com/PortAudio/portaudio/commit/45c12e8d18ae4434000ed1521e49d9b5ef91dedf
 new audacity works fine without `audacity-compat.patch`


A patch file from https://github.com/void-linux/void-packages/pull/50047.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-audacity-3.5-50047.patch --]
[-- Type: text/x-diff, Size: 45622 bytes --]

From 9dab9a6908feae52bf2e000a555a1ffb61819b97 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 19:11:47 +0600
Subject: [PATCH 1/6] audacity: update to 3.5.1.

---
 srcpkgs/audacity/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template
index 7b838119ab2611..27f17c0ec22eb0 100644
--- a/srcpkgs/audacity/template
+++ b/srcpkgs/audacity/template
@@ -1,6 +1,6 @@
 # Template file for 'audacity'
 pkgname=audacity
-version=3.4.2
+version=3.5.1
 revision=1
 build_style=cmake
 build_helper="cmake-wxWidgets-gtk3 qemu"
@@ -25,7 +25,7 @@ license="GPL-2.0-or-later, GPL-3.0-or-later, CC-BY-3.0"
 homepage="https://www.audacityteam.org"
 changelog="https://github.com/audacity/audacity/raw/master/CHANGELOG.txt"
 distfiles="https://github.com/audacity/audacity/releases/download/Audacity-${version}/audacity-sources-${version}.tar.gz"
-checksum=f28dd718d2c5a2aa9f207b8351443a90c1f02b65378ca94bcc7febda42635e48
+checksum=8786a1be8d63f4793fc3f2a5f1f61c441e0a4b9a7ed9137d59277ad5f72bd512
 
 CXXFLAGS="-D_FILE_OFFSET_BITS=64"
 

From 2231d6eb631da49cce3416e103b4fe7a47e65231 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:06 +0600
Subject: [PATCH 2/6] lilv: update to 0.24.24.

---
 srcpkgs/lilv/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/lilv/template b/srcpkgs/lilv/template
index 57f4bc30b9501b..bf03429f42c1e9 100644
--- a/srcpkgs/lilv/template
+++ b/srcpkgs/lilv/template
@@ -1,18 +1,18 @@
 # Template file for 'lilv'
 pkgname=lilv
-version=0.24.12
-revision=4
-build_style=waf3
-configure_args="--dyn-manifest"
+version=0.24.24
+revision=1
+build_style=meson
 hostmakedepends="pkg-config"
 makedepends="python3-devel serd-devel sord-devel sratom-devel libsndfile-devel
  lv2"
 short_desc="Simple yet powerful C API for using LV2 plugins"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="ISC"
-homepage="http://drobilla.net/software/lilv/"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=26a37790890c9c1f838203b47f5b2320334fe92c02a4d26ebbe2669dbd769061
+homepage="https://drobilla.net/software/lilv.html"
+changelog="https://raw.githubusercontent.com/lv2/lilv/master/NEWS"
+distfiles="https://download.drobilla.net/lilv-${version}.tar.xz"
+checksum=6bb6be9f88504176d0642f12de809b2b9e2dc55621a68adb8c7edb99aefabb4f
 
 post_install() {
 	vlicense COPYING
@@ -31,7 +31,8 @@ lilv-bash-completion_package() {
 	depends="bash-completion lilv"
 	short_desc+=" - Bash completion for Lilv"
 	pkg_install() {
-		vcompletion utils/lilv.bash_completion bash
+		vcompletion ${DESTDIR}/etc/bash_completion.d/lilv bash
+		rm -r ${DESTDIR}/etc
 	}
 }
 

From c71bb7e1874a70f752f7a492d87d84a52e98e486 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:14 +0600
Subject: [PATCH 3/6] portaudio: update to 190700.20210406.

---
 .../portaudio/patches/audacity-compat.patch   | 344 -------
 srcpkgs/portaudio/patches/sndio.patch         | 883 ------------------
 srcpkgs/portaudio/template                    |  18 +-
 3 files changed, 7 insertions(+), 1238 deletions(-)
 delete mode 100644 srcpkgs/portaudio/patches/audacity-compat.patch
 delete mode 100644 srcpkgs/portaudio/patches/sndio.patch

diff --git a/srcpkgs/portaudio/patches/audacity-compat.patch b/srcpkgs/portaudio/patches/audacity-compat.patch
deleted file mode 100644
index eb89f0a6346db2..00000000000000
--- a/srcpkgs/portaudio/patches/audacity-compat.patch
+++ /dev/null
@@ -1,344 +0,0 @@
-Source: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/portaudio-audacity-compat.patch
-Upstream: No
-Reason: Audacity needs Pa_GetStreamHostApiType to use system wide portaudio
-
-
-diff --git a/configure.in b/configure.in
-index 13816fb..83c239a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -420,6 +420,7 @@ case "${host_os}" in
-                    DLL_LIBS="$DLL_LIBS -lossaudio"
-                    LIBS="$LIBS -lossaudio"
-            fi
-+           INCLUDES="$INCLUDES pa_unix_oss.h"
-            AC_DEFINE(PA_USE_OSS,1)
-         fi
- 
-diff --git a/include/pa_unix_oss.h b/include/pa_unix_oss.h
-new file mode 100644
-index 0000000..64e04cb
---- /dev/null
-+++ b/include/pa_unix_oss.h
-@@ -0,0 +1,104 @@
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-diff --git a/include/pa_win_ds.h b/include/pa_win_ds.h
-index 5d38641..ba1c245 100644
---- a/include/pa_win_ds.h
-+++ b/include/pa_win_ds.h
-@@ -86,6 +86,21 @@ typedef struct PaWinDirectSoundStreamInfo{
- 
- }PaWinDirectSoundStreamInfo;
- 
-+/** Retrieve the GUID of the input device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
-+
-+/** Retrieve the GUID of the output device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
- 
- 
- #ifdef __cplusplus
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 8a94aaf..9c8a295 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -1197,6 +1197,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* stream );
- signed long Pa_GetStreamWriteAvailable( PaStream* stream );
- 
- 
-+/** Retrieve the host type handling an open stream.
-+
-+ @return Returns a non-negative value representing the host API type
-+ handling an open stream or, a PaErrorCode (which are always negative)
-+ if PortAudio is not initialized or an error is encountered.
-+*/
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
-+
-+
- /* Miscellaneous utilities */
- 
- 
-diff --git a/src/common/pa_front.c b/src/common/pa_front.c
-index 188cee9..52f44a6 100644
---- a/src/common/pa_front.c
-+++ b/src/common/pa_front.c
-@@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream,
-                                   hostApiInputParametersPtr, hostApiOutputParametersPtr,
-                                   sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
- 
--    if( result == paNoError )
-+    if( result == paNoError ) {
-         AddOpenStream( *stream );
-+        PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
-+    }
- 
- 
-     PA_LOGAPI(("Pa_OpenStream returned:\n" ));
-@@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream )
-     return result;
- }
- 
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
-+{
-+    PaError error = PaUtil_ValidateStreamPointer( stream );
-+    PaHostApiTypeId result;
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
-+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
-+#endif
-+
-+    if( error == paNoError )
-+    {
-+        result = PA_STREAM_REP(stream)->hostApiType;
-+    }
-+    else
-+    {
-+        result = (PaHostApiTypeId) error;
-+    }
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
-+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
-+#endif
-+
-+    return result;
-+}
- 
- PaError Pa_GetSampleSize( PaSampleFormat format )
- {
-diff --git a/src/common/pa_stream.c b/src/common/pa_stream.c
-index 03a0ee6..c4376f9 100644
---- a/src/common/pa_stream.c
-+++ b/src/common/pa_stream.c
-@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe
-     streamRepresentation->streamInfo.inputLatency = 0.;
-     streamRepresentation->streamInfo.outputLatency = 0.;
-     streamRepresentation->streamInfo.sampleRate = 0.;
-+
-+    streamRepresentation->hostApiType = 0;
- }
- 
- 
-diff --git a/src/common/pa_stream.h b/src/common/pa_stream.h
-index 678e2ad..70572c7 100644
---- a/src/common/pa_stream.h
-+++ b/src/common/pa_stream.h
-@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation {
-     PaStreamFinishedCallback *streamFinishedCallback;
-     void *userData;
-     PaStreamInfo streamInfo;
-+    PaHostApiTypeId hostApiType;
- } PaUtilStreamRepresentation;
- 
- 
-diff --git a/src/hostapi/alsa/pa_linux_alsa.c b/src/hostapi/alsa/pa_linux_alsa.c
-index 584cde8..558fb3d 100644
---- a/src/hostapi/alsa/pa_linux_alsa.c
-+++ b/src/hostapi/alsa/pa_linux_alsa.c
-@@ -621,6 +621,7 @@ typedef struct
-     StreamDirection streamDir;
- 
-     snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */
-+    int card;
- } PaAlsaStreamComponent;
- 
- /* Implementation specific stream structure */
-@@ -1873,6 +1874,7 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
- {
-     PaError result = paNoError;
-     PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError;
-+    snd_pcm_info_t* pcmInfo;
-     assert( params->channelCount > 0 );
- 
-     /* Make sure things have an initial value */
-@@ -1900,6 +1902,9 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
-     self->device = params->device;
- 
-     PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) );
-+
-+    snd_pcm_info_alloca( &pcmInfo );
-+    self->card = snd_pcm_info_get_card( pcmInfo );
-     self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm );
- 
-     PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) );
-@@ -4605,9 +4610,7 @@ PaError PaAlsa_GetStreamInputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->capture.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->capture.card;
- 
- error:
-     return result;
-@@ -4624,9 +4627,7 @@ PaError PaAlsa_GetStreamOutputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->playback.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->playback.card;
- 
- error:
-     return result;
-diff --git a/src/hostapi/coreaudio/pa_mac_core_blocking.c b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-index 679c6ba..a69e085 100644
---- a/src/hostapi/coreaudio/pa_mac_core_blocking.c
-+++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-@@ -66,6 +66,9 @@
- #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
- # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
- # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
-+#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
-+# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
-+# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
- #else
- # include <libkern/OSAtomic.h>
- #endif
-diff --git a/src/hostapi/oss/pa_unix_oss.c b/src/hostapi/oss/pa_unix_oss.c
-index 51e9630..f257d80 100644
---- a/src/hostapi/oss/pa_unix_oss.c
-+++ b/src/hostapi/oss/pa_unix_oss.c
-@@ -2043,3 +2043,26 @@ error:
- #endif
- }
- 
-+const char *PaOSS_GetStreamInputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->capture )
-+    {
-+      return stream->capture->devName;
-+    }
-+
-+   return NULL;
-+}
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->playback )
-+    {
-+      return stream->playback->devName;
-+    }
-+
-+   return NULL;
-+}
diff --git a/srcpkgs/portaudio/patches/sndio.patch b/srcpkgs/portaudio/patches/sndio.patch
deleted file mode 100644
index 9fc20960d58622..00000000000000
--- a/srcpkgs/portaudio/patches/sndio.patch
+++ /dev/null
@@ -1,883 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 5e1a764..2747f73 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -44,7 +44,7 @@ PALIB = libportaudio.la
- PAINC = include/portaudio.h
- 
- PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \
--	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \
-+	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS|PaSndio)_.*" \
- 	     -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
- 
- COMMON_OBJS = \
-@@ -146,6 +146,7 @@ SRC_DIRS = \
- 	src/hostapi/dsound \
- 	src/hostapi/jack \
- 	src/hostapi/oss \
-+	src/hostapi/sndio \
- 	src/hostapi/wasapi \
- 	src/hostapi/wdmks \
- 	src/hostapi/wmme \
-diff --git a/configure.in b/configure.in
-index 83c239a..db11d65 100644
---- a/configure.in
-+++ b/configure.in
-@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
-             AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
-             [with_alsa=$withval])
- 
-+AC_ARG_WITH(sndio,
-+            AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
-+            [with_sndio=$withval])
-+
- AC_ARG_WITH(jack,
-             AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
-             [with_jack=$withval])
-@@ -120,6 +124,10 @@ have_alsa=no
- if test "x$with_alsa" != "xno"; then
-     AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
- fi
-+have_sndio=no
-+if test "x$with_sndio" != "xno"; then
-+    AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
-+fi
- have_asihpi=no
- if test "x$with_asihpi" != "xno"; then
-     AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
-@@ -406,6 +414,13 @@ case "${host_os}" in
-            AC_DEFINE(PA_USE_ALSA,1)
-         fi
- 
-+        if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
-+            DLL_LIBS="$DLL_LIBS -lsndio"
-+            LIBS="$LIBS -lsndio"
-+            OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
-+            AC_DEFINE(PA_USE_SNDIO,1)
-+        fi
-+
-         if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
-            DLL_LIBS="$DLL_LIBS $JACK_LIBS"
-            CFLAGS="$CFLAGS $JACK_CFLAGS"
-@@ -510,6 +525,7 @@ case "$target_os" in
-         ;;
-      *)
- 	AC_MSG_RESULT([
-+  Sndio ....................... $have_sndio
-   OSS ......................... $have_oss
-   JACK ........................ $have_jack
- ])
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 9c8a295..e535a02 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
-     paWDMKS=11,
-     paJACK=12,
-     paWASAPI=13,
--    paAudioScienceHPI=14
-+    paAudioScienceHPI=14,
-+    paSndio=15
- } PaHostApiTypeId;
- 
- 
-diff --git a/src/hostapi/sndio/pa_sndio.c b/src/hostapi/sndio/pa_sndio.c
-new file mode 100644
-index 0000000..725ef47
---- /dev/null
-+++ b/src/hostapi/sndio/pa_sndio.c
-@@ -0,0 +1,768 @@
-+/*
-+ * Copyright (c) 2009 Alexandre Ratchov <alex@caoua.org>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+#include <sys/types.h>
-+#include <pthread.h>
-+#include <poll.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <sndio.h>
-+
-+#include "pa_util.h"
-+#include "pa_hostapi.h"
-+#include "pa_stream.h"
-+#include "pa_process.h"
-+#include "pa_allocation.h"
-+
-+#if 0
-+#define DPR(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
-+#else
-+#define DPR(...) do {} while (0)
-+#endif
-+
-+/*
-+ * per-stream data
-+ */
-+typedef struct PaSndioStream
-+{
-+	PaUtilStreamRepresentation base;
-+	PaUtilBufferProcessor bufproc;	/* format conversion */
-+	struct sio_hdl *hdl;		/* handle for device i/o */
-+	struct sio_par par;		/* current device parameters */	
-+	unsigned mode;			/* SIO_PLAY, SIO_REC or both */
-+	int stopped;			/* stop requested or not started */
-+	int active;			/* thread is running */
-+	unsigned long long realpos;	/* frame number h/w is processing */
-+	char *rbuf, *wbuf;		/* bounce buffers for conversions */
-+	unsigned long long rpos, wpos;	/* bytes read/written */
-+	pthread_t thread;		/* thread of the callback interface */
-+} PaSndioStream;
-+
-+/*
-+ * api "class" data, common to all streams
-+ */
-+typedef struct PaSndioHostApiRepresentation
-+{
-+	PaUtilHostApiRepresentation base;
-+	PaUtilStreamInterface callback;
-+	PaUtilStreamInterface blocking;
-+	/*
-+	 * sndio has no device discovery mechanism and PortAudio has
-+	 * no way of accepting raw device strings from users.
-+	 * Normally we just expose the default device, which can be
-+	 * changed via the AUDIODEVICE environment variable, but we
-+	 * also allow specifying a list of up to 16 devices via the
-+	 * PA_SNDIO_AUDIODEVICES environment variable.
-+	 *
-+	 * Example:
-+	 * PA_SNDIO_AUDIODEVICES=default:snd/0.monitor:snd@remote/0
-+	 */
-+#define PA_SNDIO_AUDIODEVICES_MAX	16
-+	PaDeviceInfo device_info[PA_SNDIO_AUDIODEVICES_MAX];
-+	PaDeviceInfo *infos[PA_SNDIO_AUDIODEVICES_MAX];
-+	char *audiodevices;
-+} PaSndioHostApiRepresentation;
-+
-+/*
-+ * callback invoked when blocks are processed by the hardware
-+ */
-+static void
-+sndioOnMove(void *addr, int delta)
-+{
-+	PaSndioStream *s = (PaSndioStream *)addr;
-+
-+	s->realpos += delta;
-+}
-+
-+/*
-+ * convert PA encoding to sndio encoding, return true on success
-+ */
-+static int
-+sndioSetFmt(struct sio_par *sio, PaSampleFormat fmt)
-+{
-+	switch (fmt & ~paNonInterleaved) {
-+	case paInt32:
-+		sio->sig = 1;
-+		sio->bits = 32;
-+		break;
-+	case paInt24:
-+		sio->sig = 1;
-+		sio->bits = 24;
-+		sio->bps = 3;	/* paInt24 is packed format */
-+		break;
-+	case paInt16:
-+	case paFloat32:
-+		sio->sig = 1;
-+		sio->bits = 16;
-+		break;
-+	case paInt8:
-+		sio->sig = 1;
-+		sio->bits = 8;
-+		break;
-+	case paUInt8:
-+		sio->sig = 0;
-+		sio->bits = 8;
-+		break;
-+	default:
-+		DPR("sndioSetFmt: %x: unsupported\n", fmt);
-+		return 0;
-+	}
-+	sio->le = SIO_LE_NATIVE;
-+	return 1;
-+}
-+
-+/*
-+ * convert sndio encoding to PA encoding, return true on success
-+ */
-+static int
-+sndioGetFmt(struct sio_par *sio, PaSampleFormat *fmt)
-+{
-+	if ((sio->bps * 8 != sio->bits && !sio->msb) ||
-+	    (sio->bps > 1 && sio->le != SIO_LE_NATIVE)) {
-+		DPR("sndioGetFmt: bits = %u, le = %u, msb = %u, bps = %u\n",
-+		    sio->bits, sio->le, sio->msb, sio->bps);
-+		return 0;
-+	}
-+
-+	switch (sio->bits) {
-+	case 32:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt32;
-+		break;
-+	case 24:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = (sio->bps == 3) ? paInt24 : paInt32;
-+		break;
-+	case 16:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt16;
-+		break;
-+	case 8:
-+		*fmt = sio->sig ? paInt8 : paUInt8;
-+		break;
-+	default:
-+		DPR("sndioGetFmt: %u: unsupported\n", sio->bits);
-+		return 0;
-+	}
-+	return 1;
-+}
-+
-+/*
-+ * I/O loop for callback interface
-+ */
-+static void *
-+sndioThread(void *arg)
-+{
-+	PaSndioStream *s = (PaSndioStream *)arg;
-+	PaStreamCallbackTimeInfo ti;
-+	unsigned char *data;
-+	unsigned todo, rblksz, wblksz;
-+	int n, result;
-+	
-+	rblksz = s->par.round * s->par.rchan * s->par.bps;
-+	wblksz = s->par.round * s->par.pchan * s->par.bps;
-+	
-+	DPR("sndioThread: mode = %x, round = %u, rblksz = %u, wblksz = %u\n",
-+	    s->mode, s->par.round, rblksz, wblksz);
-+	
-+	while (!s->stopped) {
-+		if (s->mode & SIO_REC) {
-+			todo = rblksz;
-+			data = s->rbuf;
-+			while (todo > 0) {
-+				n = sio_read(s->hdl, data, todo);
-+				if (n == 0) {
-+					DPR("sndioThread: sio_read failed\n");
-+					goto failed;
-+				}
-+				todo -= n;
-+				data += n;
-+			}
-+			s->rpos += s->par.round;
-+			ti.inputBufferAdcTime = 
-+			    (double)s->realpos / s->par.rate;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			ti.outputBufferDacTime =
-+			    (double)(s->realpos + s->par.bufsz) / s->par.rate;
-+		}
-+		ti.currentTime = s->realpos / (double)s->par.rate;
-+		PaUtil_BeginBufferProcessing(&s->bufproc, &ti, 0);
-+		if (s->mode & SIO_PLAY) {
-+			PaUtil_SetOutputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedOutputChannels(&s->bufproc,
-+			    0, s->wbuf, s->par.pchan);
-+		}
-+		if (s->mode & SIO_REC) {
-+			PaUtil_SetInputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedInputChannels(&s->bufproc,
-+			    0, s->rbuf, s->par.rchan);
-+		}
-+		result = paContinue;
-+		n = PaUtil_EndBufferProcessing(&s->bufproc, &result);
-+		if (n != s->par.round) {
-+			DPR("sndioThread: %d < %u frames, result = %d\n",
-+			    n, s->par.round, result);
-+		}
-+		if (result != paContinue) {
-+			break;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			n = sio_write(s->hdl, s->wbuf, wblksz);
-+			if (n < wblksz) {
-+				DPR("sndioThread: sio_write failed\n");
-+				goto failed;
-+			}
-+			s->wpos += s->par.round;
-+		}
-+	}
-+ failed:
-+	s->active = 0;
-+	DPR("sndioThread: done\n");
-+}
-+
-+static PaError
-+OpenStream(struct PaUtilHostApiRepresentation *hostApi,
-+    PaStream **stream,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate,
-+    unsigned long framesPerBuffer,
-+    PaStreamFlags streamFlags,
-+    PaStreamCallback *streamCallback,
-+    void *userData)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	PaSndioStream *s;
-+	PaError err;
-+	struct sio_hdl *hdl;
-+	struct sio_par par;
-+	unsigned mode;
-+	int inch, onch;
-+	PaSampleFormat ifmt, ofmt, siofmt;
-+	const char *dev;
-+
-+	DPR("OpenStream:\n");
-+
-+	mode = 0;
-+	inch = onch = 0;
-+	ifmt = ofmt = 0;
-+	sio_initpar(&par);
-+
-+	if (outputPar && outputPar->channelCount > 0) {
-+		if (outputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad output device\n", outputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (outputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: output specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, outputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ofmt = outputPar->sampleFormat;
-+		onch = par.pchan = outputPar->channelCount;
-+		mode |= SIO_PLAY;
-+	}
-+	if (inputPar && inputPar->channelCount > 0) {
-+		if (inputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad input device\n", inputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (inputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: input specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, inputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ifmt = inputPar->sampleFormat;
-+		inch = par.rchan = inputPar->channelCount;
-+		mode |= SIO_REC;
-+	}
-+	par.rate = sampleRate;
-+	if (framesPerBuffer != paFramesPerBufferUnspecified)
-+		par.round = framesPerBuffer;
-+
-+	DPR("OpenStream: mode = %x, trying rate = %u\n", mode, par.rate);
-+
-+	if (outputPar) {
-+		dev = sndioHostApi->device_info[outputPar->device].name;
-+	} else if (inputPar) {
-+		dev = sndioHostApi->device_info[inputPar->device].name;
-+	} else {
-+		return paUnanticipatedHostError;
-+	}
-+	hdl = sio_open(dev, mode, 0);
-+	if (hdl == NULL)
-+		return paUnanticipatedHostError;
-+	if (!sio_setpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sio_getpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sndioGetFmt(&par, &siofmt)) {
-+		sio_close(hdl);
-+		return paSampleFormatNotSupported;
-+	}
-+	if ((mode & SIO_REC) && par.rchan != inputPar->channelCount) {
-+		DPR("OpenStream: rchan(%u) != %d\n", par.rchan, inputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((mode & SIO_PLAY) && par.pchan != outputPar->channelCount) {
-+		DPR("OpenStream: pchan(%u) != %d\n", par.pchan, outputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((double)par.rate < sampleRate * 0.995 ||
-+	    (double)par.rate > sampleRate * 1.005) {
-+		DPR("OpenStream: rate(%u) != %g\n", par.rate, sampleRate);
-+		sio_close(hdl);
-+		return paInvalidSampleRate;
-+	}
-+	
-+	s = (PaSndioStream *)PaUtil_AllocateMemory(sizeof(PaSndioStream));
-+	if (s == NULL) {
-+		sio_close(hdl);
-+		return paInsufficientMemory;
-+	}
-+	PaUtil_InitializeStreamRepresentation(&s->base, 
-+	    streamCallback ? &sndioHostApi->callback : &sndioHostApi->blocking,
-+	    streamCallback, userData);
-+	DPR("inch = %d, onch = %d, ifmt = %x, ofmt = %x\n", 
-+	    inch, onch, ifmt, ofmt);
-+	err = PaUtil_InitializeBufferProcessor(&s->bufproc,
-+	    inch, ifmt, siofmt,
-+	    onch, ofmt, siofmt,
-+	    sampleRate,
-+	    streamFlags,
-+	    framesPerBuffer,
-+	    par.round,
-+	    paUtilFixedHostBufferSize, 
-+	    streamCallback, userData);
-+	if (err) {
-+		DPR("OpenStream: PaUtil_InitializeBufferProcessor failed\n");
-+		PaUtil_FreeMemory(s);
-+		sio_close(hdl);
-+		return err;
-+	}
-+	if (mode & SIO_REC) {
-+		s->rbuf = malloc(par.round * par.rchan * par.bps);
-+		if (s->rbuf == NULL) {
-+			DPR("OpenStream: failed to allocate rbuf\n");
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}
-+	if (mode & SIO_PLAY) {
-+		s->wbuf = malloc(par.round * par.pchan * par.bps);
-+		if (s->wbuf == NULL) {
-+			DPR("OpenStream: failed to allocate wbuf\n");
-+			free(s->rbuf);
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}	
-+	s->base.streamInfo.inputLatency = 0;
-+	s->base.streamInfo.outputLatency = (mode & SIO_PLAY) ?
-+	    (double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatencyFrames(&s->bufproc)) / (double)par.rate : 0;
-+	s->base.streamInfo.sampleRate = par.rate;
-+	s->active = 0;
-+	s->stopped = 1;
-+	s->mode = mode;
-+	s->hdl = hdl;
-+	s->par = par;
-+	*stream = s;	
-+	DPR("OpenStream: done\n");
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingReadStream(PaStream *stream, void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res, todo;
-+	void *buf;
-+	
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		buf = s->rbuf;
-+		todo = n * s->par.rchan * s->par.bps;
-+		while (todo > 0) {
-+			res = sio_read(s->hdl, buf, todo);
-+			if (res == 0)
-+				return paUnanticipatedHostError;
-+			buf = (char *)buf + res;
-+			todo -= res;
-+		}
-+		s->rpos += n;
-+		PaUtil_SetInputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedInputChannels(&s->bufproc, 0, s->rbuf, s->par.rchan);
-+		res = PaUtil_CopyInput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingReadStream: copyInput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingWriteStream(PaStream* stream, const void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res;
-+
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		PaUtil_SetOutputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedOutputChannels(&s->bufproc, 0, s->wbuf, s->par.pchan);
-+		res = PaUtil_CopyOutput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingWriteStream: copyOutput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		res = sio_write(s->hdl, s->wbuf, n * s->par.pchan * s->par.bps);
-+		if (res == 0)
-+			return paUnanticipatedHostError;		
-+		s->wpos += n;
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static signed long
-+BlockingGetStreamReadAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLIN);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLIN))
-+		return 0;
-+
-+	return s->realpos - s->rpos;
-+}
-+
-+static signed long
-+BlockingGetStreamWriteAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLOUT);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLOUT))
-+		return 0;
-+
-+	return s->par.bufsz - (s->wpos - s->realpos);
-+}
-+
-+static PaError
-+BlockingWaitEmpty( PaStream *stream )
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	/*
-+	 * drain playback buffers; sndio always does it in background
-+	 * and there is no way to wait for completion
-+	 */
-+	DPR("BlockingWaitEmpty: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return paNoError;
-+}
-+
-+static PaError
-+StartStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned primes, wblksz;
-+	int err;
-+
-+	DPR("StartStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (!s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 0;
-+	s->active = 1;
-+	s->realpos = 0;
-+	s->wpos = 0;
-+	s->rpos = 0;
-+	PaUtil_ResetBufferProcessor(&s->bufproc);
-+	if (!sio_start(s->hdl))
-+		return paUnanticipatedHostError;
-+
-+	/*
-+	 * send a complete buffer of silence
-+	 */
-+	if (s->mode & SIO_PLAY) {
-+		wblksz = s->par.round * s->par.pchan * s->par.bps;
-+		memset(s->wbuf, 0, wblksz);
-+		for (primes = s->par.bufsz / s->par.round; primes > 0; primes--)
-+			s->wpos += sio_write(s->hdl, s->wbuf, wblksz);
-+	}
-+	if (s->base.streamCallback) {
-+		err = pthread_create(&s->thread, NULL, sndioThread, s);
-+		if (err) {
-+			DPR("SndioStartStream: couldn't create thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+		DPR("StartStream: started...\n");
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+StopStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	void *ret;
-+	int err;
-+
-+	DPR("StopStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 1;
-+	if (s->base.streamCallback) {
-+		err = pthread_join(s->thread, &ret);
-+		if (err) {
-+			DPR("SndioStop: couldn't join thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+	}
-+	if (!sio_stop(s->hdl))
-+		return paUnanticipatedHostError;
-+	return paNoError;
-+}
-+
-+static PaError
-+CloseStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	DPR("CloseStream:\n");
-+
-+	if (!s->stopped)
-+		StopStream(stream);
-+
-+	if (s->mode & SIO_REC)
-+		free(s->rbuf);
-+	if (s->mode & SIO_PLAY)
-+		free(s->wbuf);
-+	sio_close(s->hdl);
-+        PaUtil_TerminateStreamRepresentation(&s->base);
-+	PaUtil_TerminateBufferProcessor(&s->bufproc);
-+	PaUtil_FreeMemory(s);
-+	return paNoError;
-+}
-+
-+static PaError
-+AbortStream(PaStream *stream)
-+{
-+	DPR("AbortStream:\n");
-+
-+	return StopStream(stream);
-+}
-+
-+static PaError
-+IsStreamStopped(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamStopped: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->stopped;
-+}
-+
-+static PaError
-+IsStreamActive(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamActive: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->active;
-+}
-+
-+static PaTime
-+GetStreamTime(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	return (double)s->realpos / s->base.streamInfo.sampleRate;
-+}
-+
-+static PaError
-+IsFormatSupported(struct PaUtilHostApiRepresentation *hostApi,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate)
-+{
-+	return paFormatIsSupported;
-+}
-+
-+static void
-+Terminate(struct PaUtilHostApiRepresentation *hostApi)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	free(sndioHostApi->audiodevices);
-+	PaUtil_FreeMemory(hostApi);
-+}
-+
-+static void
-+InitDeviceInfo(PaDeviceInfo *info, PaHostApiIndex hostApiIndex, const char *name)
-+{
-+	info->structVersion = 2;
-+	info->name = name;
-+	info->hostApi = hostApiIndex;
-+	info->maxInputChannels = 128;
-+	info->maxOutputChannels = 128;
-+	info->defaultLowInputLatency = 0.01;
-+	info->defaultLowOutputLatency = 0.01;
-+	info->defaultHighInputLatency = 0.5;
-+	info->defaultHighOutputLatency = 0.5;
-+	info->defaultSampleRate = 48000;
-+}
-+
-+PaError
-+PaSndio_Initialize(PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	PaDeviceInfo *info;
-+	struct sio_hdl *hdl;
-+	char *audiodevices;
-+	char *device;
-+	size_t deviceCount;
-+
-+	DPR("PaSndio_Initialize: initializing...\n");
-+
-+	if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) == NULL)
-+		return paNoError;
-+	sio_close(hdl);
-+	/* unusable APIs should return paNoError and a NULL hostApi */
-+	*hostApi = NULL;
-+
-+	sndioHostApi = PaUtil_AllocateMemory(sizeof(PaSndioHostApiRepresentation));
-+	if (sndioHostApi == NULL)
-+		return paNoError;
-+
-+	// Add default device
-+	info = &sndioHostApi->device_info[0];
-+	InitDeviceInfo(info, hostApiIndex, SIO_DEVANY);
-+	sndioHostApi->infos[0] = info;
-+	deviceCount = 1;
-+
-+	// Add additional devices as specified in the PA_SNDIO_AUDIODEVICES
-+	// environment variable as a colon separated list
-+	sndioHostApi->audiodevices = NULL;
-+	audiodevices = getenv("PA_SNDIO_AUDIODEVICES");
-+	if (audiodevices != NULL) {
-+		sndioHostApi->audiodevices = strdup(audiodevices);
-+		if (sndioHostApi->audiodevices == NULL)
-+			return paNoError;
-+
-+		audiodevices = sndioHostApi->audiodevices;
-+		while ((device = strsep(&audiodevices, ":")) != NULL &&
-+			deviceCount < PA_SNDIO_AUDIODEVICES_MAX) {
-+			if (*device == '\0')
-+				continue;
-+			info = &sndioHostApi->device_info[deviceCount];
-+			InitDeviceInfo(info, hostApiIndex, device);
-+			sndioHostApi->infos[deviceCount] = info;
-+			deviceCount++;
-+		}
-+	}
-+
-+	*hostApi = &sndioHostApi->base;
-+	(*hostApi)->info.structVersion = 1;
-+	(*hostApi)->info.type = paSndio;
-+	(*hostApi)->info.name = "sndio";
-+	(*hostApi)->info.deviceCount = deviceCount;
-+	(*hostApi)->info.defaultInputDevice = 0;
-+	(*hostApi)->info.defaultOutputDevice = 0;
-+	(*hostApi)->deviceInfos = sndioHostApi->infos;
-+	(*hostApi)->Terminate = Terminate;
-+	(*hostApi)->OpenStream = OpenStream;
-+	(*hostApi)->IsFormatSupported = IsFormatSupported;
-+	
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->blocking,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    BlockingReadStream,
-+	    BlockingWriteStream,
-+	    BlockingGetStreamReadAvailable,
-+	    BlockingGetStreamWriteAvailable);
-+
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->callback,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    PaUtil_DummyRead,
-+	    PaUtil_DummyWrite,
-+	    PaUtil_DummyGetReadAvailable,
-+	    PaUtil_DummyGetWriteAvailable);
-+
-+	DPR("PaSndio_Initialize: done\n");
-+	return paNoError;
-+}
-diff --git a/src/os/unix/pa_unix_hostapis.c b/src/os/unix/pa_unix_hostapis.c
-index a9b4a05..f10ced1 100644
---- a/src/os/unix/pa_unix_hostapis.c
-+++ b/src/os/unix/pa_unix_hostapis.c
-@@ -44,6 +44,7 @@
- 
- PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-+PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- /* Added for IRIX, Pieter, oct 2, 2003: */
- PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-@@ -57,6 +58,10 @@ PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiI
- 
- PaUtilHostApiInitializer *paHostApiInitializers[] =
-     {
-+#ifdef PA_USE_SNDIO
-+	    PaSndio_Initialize,
-+#endif
-+
- #ifdef __linux__
- 
- #if PA_USE_ALSA
--- 
-2.27.0
-
diff --git a/srcpkgs/portaudio/template b/srcpkgs/portaudio/template
index 54dcd9a7215504..fe087e9f24f16c 100644
--- a/srcpkgs/portaudio/template
+++ b/srcpkgs/portaudio/template
@@ -1,23 +1,19 @@
 # Template file for 'portaudio'
 pkgname=portaudio
-version=190600.20161030
-revision=6
+version=190700.20210406
+revision=1
 build_style=gnu-configure
-configure_args="--enable-cxx --with-jack $(vopt_enable sndio)"
+configure_args="--enable-cxx --with-jack --with-sndio"
 hostmakedepends="pkg-config"
-makedepends="alsa-lib-devel jack-devel $(vopt_if sndio sndio-devel)"
+makedepends="alsa-lib-devel jack-devel sndio-devel"
 short_desc="Portable cross-platform audio I/O library"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="http://www.portaudio.com"
-distfiles="http://www.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
-checksum=f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513
+homepage="https://www.portaudio.com"
+distfiles="https://files.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
+checksum=47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def
 disable_parallel_build=yes
 
-# sndio disabled by default: non-upstream patch
-build_options="sndio"
-build_options_default=""
-
 post_install() {
 	vlicense LICENSE.txt
 }

From 205244e4659ddfa564a15fe1c68578ed8810dd39 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:27 +0600
Subject: [PATCH 4/6] sqlite: update to 3.45.3.

---
 srcpkgs/sqlite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sqlite/template b/srcpkgs/sqlite/template
index 1d548eb479560b..4ae8fd4d281465 100644
--- a/srcpkgs/sqlite/template
+++ b/srcpkgs/sqlite/template
@@ -1,6 +1,6 @@
 # Template file for 'sqlite'
 pkgname=sqlite
-version=3.45.2
+version=3.45.3
 revision=1
 _amalgamationver=$(printf "%d%02d%02d00\n" ${version//./ })
 build_style=gnu-configure
@@ -12,7 +12,7 @@ license="Public Domain"
 homepage="https://sqlite.org/"
 changelog="https://www.sqlite.org/changes.html"
 distfiles="https://sqlite.org/2024/sqlite-autoconf-${_amalgamationver}.tar.gz"
-checksum=bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae
+checksum=b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531
 
 CFLAGS="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE \

From 814df4b7414904cdfdc3ca6d089867ad7b7bac69 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:32 +0600
Subject: [PATCH 5/6] suil: update to 0.10.20.

---
 srcpkgs/suil/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/suil/template b/srcpkgs/suil/template
index 680e1972cd4371..58d7d4aceee052 100644
--- a/srcpkgs/suil/template
+++ b/srcpkgs/suil/template
@@ -1,8 +1,8 @@
 # Template file for 'suil'
 pkgname=suil
-version=0.10.12
+version=0.10.20
 revision=1
-build_style=waf3
+build_style=meson
 hostmakedepends="pkg-config lv2"
 makedepends="gtk+-devel qt5-devel gtk+3-devel"
 short_desc="Lightweight C library for loading and wrapping LV2 plugin UIs"
@@ -10,8 +10,8 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://drobilla.net/software/suil.html"
 changelog="https://gitlab.com/lv2/suil/-/raw/master/NEWS"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=daa763b231b22a1f532530d3e04c1fae48d1e1e03785e23c9ac138f207b87ecd
+distfiles="https://download.drobilla.net/suil-${version}.tar.xz"
+checksum=334a3ed3e73d5e17ff400b3db9801f63809155b0faa8b1b9046f9dd3ffef934e
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-host-tools qt5-devel"

From f3c0f3dcd8369b4ba590735405760d92f7980a39 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:39 +0600
Subject: [PATCH 6/6] wavpack: update to 5.7.0.

---
 srcpkgs/wavpack/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wavpack/template b/srcpkgs/wavpack/template
index d9b0f68f014bda..c6c65770f0d7fc 100644
--- a/srcpkgs/wavpack/template
+++ b/srcpkgs/wavpack/template
@@ -1,6 +1,6 @@
 # Template file for 'wavpack'
 pkgname=wavpack
-version=5.6.0
+version=5.7.0
 revision=1
 build_style=gnu-configure
 configure_args="--enable-static"
@@ -10,7 +10,7 @@ license="BSD-3-Clause"
 homepage="https://www.wavpack.com/"
 changelog="https://raw.githubusercontent.com/dbry/WavPack/master/NEWS"
 distfiles="https://www.wavpack.com/wavpack-${version}.tar.bz2"
-checksum=8cbfa15927d29bcf953db35c0cfca7424344ff43ebe4083daf161577fb839cc1
+checksum=8944b237968a1b3976a1eb47cd556916e041a2aa8917495db65f82c3fcc2a225
 
 case "$XBPS_TARGET_MACHINE" in
 	armv5*) configure_args+=" --disable-asm";;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] [WIP] audacity: update to 3.5.1. Update audacity and deps
  2024-04-26 17:50 [PR PATCH] audacity: update to 3.5.1. Update audacity and deps iFoundSilentHouse
                   ` (2 preceding siblings ...)
  2024-04-26 19:17 ` iFoundSilentHouse
@ 2024-04-26 22:14 ` iFoundSilentHouse
  2024-04-26 22:16 ` iFoundSilentHouse
  2024-04-26 23:13 ` [PR PATCH] [Updated] " iFoundSilentHouse
  5 siblings, 0 replies; 7+ messages in thread
From: iFoundSilentHouse @ 2024-04-26 22:14 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

There is an updated pull request by iFoundSilentHouse against master on the void-packages repository

https://github.com/iFoundSilentHouse/void-packages audacity-3.5
https://github.com/void-linux/void-packages/pull/50047

[WIP] audacity: update to 3.5.1. Update audacity and deps
- I tested the changes in this PR: **YES**
- I built this PR locally for my native architecture, (x86_64-glibc)

Lilv dyn-manifest change: https://github.com/lv2/lilv/commit/17f6705ae6d0e8c7202f598f5271786a00a065be
Portaudio patches: https://github.com/PortAudio/portaudio/commit/45c12e8d18ae4434000ed1521e49d9b5ef91dedf
 new audacity works fine without `audacity-compat.patch`


A patch file from https://github.com/void-linux/void-packages/pull/50047.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-audacity-3.5-50047.patch --]
[-- Type: text/x-diff, Size: 45694 bytes --]

From cde3d78facb736b8c2ed941ad36f3b4686897a16 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 19:11:47 +0600
Subject: [PATCH 1/6] audacity: update to 3.5.1.

---
 srcpkgs/audacity/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template
index 7b838119ab2611..5638cf19b8ef6b 100644
--- a/srcpkgs/audacity/template
+++ b/srcpkgs/audacity/template
@@ -1,6 +1,6 @@
 # Template file for 'audacity'
 pkgname=audacity
-version=3.4.2
+version=3.5.1
 revision=1
 build_style=cmake
 build_helper="cmake-wxWidgets-gtk3 qemu"
@@ -25,7 +25,11 @@ license="GPL-2.0-or-later, GPL-3.0-or-later, CC-BY-3.0"
 homepage="https://www.audacityteam.org"
 changelog="https://github.com/audacity/audacity/raw/master/CHANGELOG.txt"
 distfiles="https://github.com/audacity/audacity/releases/download/Audacity-${version}/audacity-sources-${version}.tar.gz"
-checksum=f28dd718d2c5a2aa9f207b8351443a90c1f02b65378ca94bcc7febda42635e48
+checksum=8786a1be8d63f4793fc3f2a5f1f61c441e0a4b9a7ed9137d59277ad5f72bd512
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) CFLAGS="-msse2";;
+esac
 
 CXXFLAGS="-D_FILE_OFFSET_BITS=64"
 

From b1aa8ae157ec1b31270b1ed9763fa92c7a70ad8a Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:06 +0600
Subject: [PATCH 2/6] lilv: update to 0.24.24.

---
 srcpkgs/lilv/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/lilv/template b/srcpkgs/lilv/template
index 57f4bc30b9501b..bf03429f42c1e9 100644
--- a/srcpkgs/lilv/template
+++ b/srcpkgs/lilv/template
@@ -1,18 +1,18 @@
 # Template file for 'lilv'
 pkgname=lilv
-version=0.24.12
-revision=4
-build_style=waf3
-configure_args="--dyn-manifest"
+version=0.24.24
+revision=1
+build_style=meson
 hostmakedepends="pkg-config"
 makedepends="python3-devel serd-devel sord-devel sratom-devel libsndfile-devel
  lv2"
 short_desc="Simple yet powerful C API for using LV2 plugins"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="ISC"
-homepage="http://drobilla.net/software/lilv/"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=26a37790890c9c1f838203b47f5b2320334fe92c02a4d26ebbe2669dbd769061
+homepage="https://drobilla.net/software/lilv.html"
+changelog="https://raw.githubusercontent.com/lv2/lilv/master/NEWS"
+distfiles="https://download.drobilla.net/lilv-${version}.tar.xz"
+checksum=6bb6be9f88504176d0642f12de809b2b9e2dc55621a68adb8c7edb99aefabb4f
 
 post_install() {
 	vlicense COPYING
@@ -31,7 +31,8 @@ lilv-bash-completion_package() {
 	depends="bash-completion lilv"
 	short_desc+=" - Bash completion for Lilv"
 	pkg_install() {
-		vcompletion utils/lilv.bash_completion bash
+		vcompletion ${DESTDIR}/etc/bash_completion.d/lilv bash
+		rm -r ${DESTDIR}/etc
 	}
 }
 

From 439161e3c70e6c9cfb5be779442b7d4578f7feb2 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:14 +0600
Subject: [PATCH 3/6] portaudio: update to 190700.20210406.

---
 .../portaudio/patches/audacity-compat.patch   | 344 -------
 srcpkgs/portaudio/patches/sndio.patch         | 883 ------------------
 srcpkgs/portaudio/template                    |  18 +-
 3 files changed, 7 insertions(+), 1238 deletions(-)
 delete mode 100644 srcpkgs/portaudio/patches/audacity-compat.patch
 delete mode 100644 srcpkgs/portaudio/patches/sndio.patch

diff --git a/srcpkgs/portaudio/patches/audacity-compat.patch b/srcpkgs/portaudio/patches/audacity-compat.patch
deleted file mode 100644
index eb89f0a6346db2..00000000000000
--- a/srcpkgs/portaudio/patches/audacity-compat.patch
+++ /dev/null
@@ -1,344 +0,0 @@
-Source: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/portaudio-audacity-compat.patch
-Upstream: No
-Reason: Audacity needs Pa_GetStreamHostApiType to use system wide portaudio
-
-
-diff --git a/configure.in b/configure.in
-index 13816fb..83c239a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -420,6 +420,7 @@ case "${host_os}" in
-                    DLL_LIBS="$DLL_LIBS -lossaudio"
-                    LIBS="$LIBS -lossaudio"
-            fi
-+           INCLUDES="$INCLUDES pa_unix_oss.h"
-            AC_DEFINE(PA_USE_OSS,1)
-         fi
- 
-diff --git a/include/pa_unix_oss.h b/include/pa_unix_oss.h
-new file mode 100644
-index 0000000..64e04cb
---- /dev/null
-+++ b/include/pa_unix_oss.h
-@@ -0,0 +1,104 @@
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-diff --git a/include/pa_win_ds.h b/include/pa_win_ds.h
-index 5d38641..ba1c245 100644
---- a/include/pa_win_ds.h
-+++ b/include/pa_win_ds.h
-@@ -86,6 +86,21 @@ typedef struct PaWinDirectSoundStreamInfo{
- 
- }PaWinDirectSoundStreamInfo;
- 
-+/** Retrieve the GUID of the input device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
-+
-+/** Retrieve the GUID of the output device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
- 
- 
- #ifdef __cplusplus
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 8a94aaf..9c8a295 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -1197,6 +1197,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* stream );
- signed long Pa_GetStreamWriteAvailable( PaStream* stream );
- 
- 
-+/** Retrieve the host type handling an open stream.
-+
-+ @return Returns a non-negative value representing the host API type
-+ handling an open stream or, a PaErrorCode (which are always negative)
-+ if PortAudio is not initialized or an error is encountered.
-+*/
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
-+
-+
- /* Miscellaneous utilities */
- 
- 
-diff --git a/src/common/pa_front.c b/src/common/pa_front.c
-index 188cee9..52f44a6 100644
---- a/src/common/pa_front.c
-+++ b/src/common/pa_front.c
-@@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream,
-                                   hostApiInputParametersPtr, hostApiOutputParametersPtr,
-                                   sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
- 
--    if( result == paNoError )
-+    if( result == paNoError ) {
-         AddOpenStream( *stream );
-+        PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
-+    }
- 
- 
-     PA_LOGAPI(("Pa_OpenStream returned:\n" ));
-@@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream )
-     return result;
- }
- 
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
-+{
-+    PaError error = PaUtil_ValidateStreamPointer( stream );
-+    PaHostApiTypeId result;
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
-+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
-+#endif
-+
-+    if( error == paNoError )
-+    {
-+        result = PA_STREAM_REP(stream)->hostApiType;
-+    }
-+    else
-+    {
-+        result = (PaHostApiTypeId) error;
-+    }
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
-+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
-+#endif
-+
-+    return result;
-+}
- 
- PaError Pa_GetSampleSize( PaSampleFormat format )
- {
-diff --git a/src/common/pa_stream.c b/src/common/pa_stream.c
-index 03a0ee6..c4376f9 100644
---- a/src/common/pa_stream.c
-+++ b/src/common/pa_stream.c
-@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe
-     streamRepresentation->streamInfo.inputLatency = 0.;
-     streamRepresentation->streamInfo.outputLatency = 0.;
-     streamRepresentation->streamInfo.sampleRate = 0.;
-+
-+    streamRepresentation->hostApiType = 0;
- }
- 
- 
-diff --git a/src/common/pa_stream.h b/src/common/pa_stream.h
-index 678e2ad..70572c7 100644
---- a/src/common/pa_stream.h
-+++ b/src/common/pa_stream.h
-@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation {
-     PaStreamFinishedCallback *streamFinishedCallback;
-     void *userData;
-     PaStreamInfo streamInfo;
-+    PaHostApiTypeId hostApiType;
- } PaUtilStreamRepresentation;
- 
- 
-diff --git a/src/hostapi/alsa/pa_linux_alsa.c b/src/hostapi/alsa/pa_linux_alsa.c
-index 584cde8..558fb3d 100644
---- a/src/hostapi/alsa/pa_linux_alsa.c
-+++ b/src/hostapi/alsa/pa_linux_alsa.c
-@@ -621,6 +621,7 @@ typedef struct
-     StreamDirection streamDir;
- 
-     snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */
-+    int card;
- } PaAlsaStreamComponent;
- 
- /* Implementation specific stream structure */
-@@ -1873,6 +1874,7 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
- {
-     PaError result = paNoError;
-     PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError;
-+    snd_pcm_info_t* pcmInfo;
-     assert( params->channelCount > 0 );
- 
-     /* Make sure things have an initial value */
-@@ -1900,6 +1902,9 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
-     self->device = params->device;
- 
-     PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) );
-+
-+    snd_pcm_info_alloca( &pcmInfo );
-+    self->card = snd_pcm_info_get_card( pcmInfo );
-     self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm );
- 
-     PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) );
-@@ -4605,9 +4610,7 @@ PaError PaAlsa_GetStreamInputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->capture.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->capture.card;
- 
- error:
-     return result;
-@@ -4624,9 +4627,7 @@ PaError PaAlsa_GetStreamOutputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->playback.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->playback.card;
- 
- error:
-     return result;
-diff --git a/src/hostapi/coreaudio/pa_mac_core_blocking.c b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-index 679c6ba..a69e085 100644
---- a/src/hostapi/coreaudio/pa_mac_core_blocking.c
-+++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-@@ -66,6 +66,9 @@
- #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
- # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
- # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
-+#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
-+# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
-+# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
- #else
- # include <libkern/OSAtomic.h>
- #endif
-diff --git a/src/hostapi/oss/pa_unix_oss.c b/src/hostapi/oss/pa_unix_oss.c
-index 51e9630..f257d80 100644
---- a/src/hostapi/oss/pa_unix_oss.c
-+++ b/src/hostapi/oss/pa_unix_oss.c
-@@ -2043,3 +2043,26 @@ error:
- #endif
- }
- 
-+const char *PaOSS_GetStreamInputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->capture )
-+    {
-+      return stream->capture->devName;
-+    }
-+
-+   return NULL;
-+}
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->playback )
-+    {
-+      return stream->playback->devName;
-+    }
-+
-+   return NULL;
-+}
diff --git a/srcpkgs/portaudio/patches/sndio.patch b/srcpkgs/portaudio/patches/sndio.patch
deleted file mode 100644
index 9fc20960d58622..00000000000000
--- a/srcpkgs/portaudio/patches/sndio.patch
+++ /dev/null
@@ -1,883 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 5e1a764..2747f73 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -44,7 +44,7 @@ PALIB = libportaudio.la
- PAINC = include/portaudio.h
- 
- PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \
--	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \
-+	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS|PaSndio)_.*" \
- 	     -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
- 
- COMMON_OBJS = \
-@@ -146,6 +146,7 @@ SRC_DIRS = \
- 	src/hostapi/dsound \
- 	src/hostapi/jack \
- 	src/hostapi/oss \
-+	src/hostapi/sndio \
- 	src/hostapi/wasapi \
- 	src/hostapi/wdmks \
- 	src/hostapi/wmme \
-diff --git a/configure.in b/configure.in
-index 83c239a..db11d65 100644
---- a/configure.in
-+++ b/configure.in
-@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
-             AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
-             [with_alsa=$withval])
- 
-+AC_ARG_WITH(sndio,
-+            AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
-+            [with_sndio=$withval])
-+
- AC_ARG_WITH(jack,
-             AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
-             [with_jack=$withval])
-@@ -120,6 +124,10 @@ have_alsa=no
- if test "x$with_alsa" != "xno"; then
-     AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
- fi
-+have_sndio=no
-+if test "x$with_sndio" != "xno"; then
-+    AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
-+fi
- have_asihpi=no
- if test "x$with_asihpi" != "xno"; then
-     AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
-@@ -406,6 +414,13 @@ case "${host_os}" in
-            AC_DEFINE(PA_USE_ALSA,1)
-         fi
- 
-+        if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
-+            DLL_LIBS="$DLL_LIBS -lsndio"
-+            LIBS="$LIBS -lsndio"
-+            OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
-+            AC_DEFINE(PA_USE_SNDIO,1)
-+        fi
-+
-         if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
-            DLL_LIBS="$DLL_LIBS $JACK_LIBS"
-            CFLAGS="$CFLAGS $JACK_CFLAGS"
-@@ -510,6 +525,7 @@ case "$target_os" in
-         ;;
-      *)
- 	AC_MSG_RESULT([
-+  Sndio ....................... $have_sndio
-   OSS ......................... $have_oss
-   JACK ........................ $have_jack
- ])
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 9c8a295..e535a02 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
-     paWDMKS=11,
-     paJACK=12,
-     paWASAPI=13,
--    paAudioScienceHPI=14
-+    paAudioScienceHPI=14,
-+    paSndio=15
- } PaHostApiTypeId;
- 
- 
-diff --git a/src/hostapi/sndio/pa_sndio.c b/src/hostapi/sndio/pa_sndio.c
-new file mode 100644
-index 0000000..725ef47
---- /dev/null
-+++ b/src/hostapi/sndio/pa_sndio.c
-@@ -0,0 +1,768 @@
-+/*
-+ * Copyright (c) 2009 Alexandre Ratchov <alex@caoua.org>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+#include <sys/types.h>
-+#include <pthread.h>
-+#include <poll.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <sndio.h>
-+
-+#include "pa_util.h"
-+#include "pa_hostapi.h"
-+#include "pa_stream.h"
-+#include "pa_process.h"
-+#include "pa_allocation.h"
-+
-+#if 0
-+#define DPR(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
-+#else
-+#define DPR(...) do {} while (0)
-+#endif
-+
-+/*
-+ * per-stream data
-+ */
-+typedef struct PaSndioStream
-+{
-+	PaUtilStreamRepresentation base;
-+	PaUtilBufferProcessor bufproc;	/* format conversion */
-+	struct sio_hdl *hdl;		/* handle for device i/o */
-+	struct sio_par par;		/* current device parameters */	
-+	unsigned mode;			/* SIO_PLAY, SIO_REC or both */
-+	int stopped;			/* stop requested or not started */
-+	int active;			/* thread is running */
-+	unsigned long long realpos;	/* frame number h/w is processing */
-+	char *rbuf, *wbuf;		/* bounce buffers for conversions */
-+	unsigned long long rpos, wpos;	/* bytes read/written */
-+	pthread_t thread;		/* thread of the callback interface */
-+} PaSndioStream;
-+
-+/*
-+ * api "class" data, common to all streams
-+ */
-+typedef struct PaSndioHostApiRepresentation
-+{
-+	PaUtilHostApiRepresentation base;
-+	PaUtilStreamInterface callback;
-+	PaUtilStreamInterface blocking;
-+	/*
-+	 * sndio has no device discovery mechanism and PortAudio has
-+	 * no way of accepting raw device strings from users.
-+	 * Normally we just expose the default device, which can be
-+	 * changed via the AUDIODEVICE environment variable, but we
-+	 * also allow specifying a list of up to 16 devices via the
-+	 * PA_SNDIO_AUDIODEVICES environment variable.
-+	 *
-+	 * Example:
-+	 * PA_SNDIO_AUDIODEVICES=default:snd/0.monitor:snd@remote/0
-+	 */
-+#define PA_SNDIO_AUDIODEVICES_MAX	16
-+	PaDeviceInfo device_info[PA_SNDIO_AUDIODEVICES_MAX];
-+	PaDeviceInfo *infos[PA_SNDIO_AUDIODEVICES_MAX];
-+	char *audiodevices;
-+} PaSndioHostApiRepresentation;
-+
-+/*
-+ * callback invoked when blocks are processed by the hardware
-+ */
-+static void
-+sndioOnMove(void *addr, int delta)
-+{
-+	PaSndioStream *s = (PaSndioStream *)addr;
-+
-+	s->realpos += delta;
-+}
-+
-+/*
-+ * convert PA encoding to sndio encoding, return true on success
-+ */
-+static int
-+sndioSetFmt(struct sio_par *sio, PaSampleFormat fmt)
-+{
-+	switch (fmt & ~paNonInterleaved) {
-+	case paInt32:
-+		sio->sig = 1;
-+		sio->bits = 32;
-+		break;
-+	case paInt24:
-+		sio->sig = 1;
-+		sio->bits = 24;
-+		sio->bps = 3;	/* paInt24 is packed format */
-+		break;
-+	case paInt16:
-+	case paFloat32:
-+		sio->sig = 1;
-+		sio->bits = 16;
-+		break;
-+	case paInt8:
-+		sio->sig = 1;
-+		sio->bits = 8;
-+		break;
-+	case paUInt8:
-+		sio->sig = 0;
-+		sio->bits = 8;
-+		break;
-+	default:
-+		DPR("sndioSetFmt: %x: unsupported\n", fmt);
-+		return 0;
-+	}
-+	sio->le = SIO_LE_NATIVE;
-+	return 1;
-+}
-+
-+/*
-+ * convert sndio encoding to PA encoding, return true on success
-+ */
-+static int
-+sndioGetFmt(struct sio_par *sio, PaSampleFormat *fmt)
-+{
-+	if ((sio->bps * 8 != sio->bits && !sio->msb) ||
-+	    (sio->bps > 1 && sio->le != SIO_LE_NATIVE)) {
-+		DPR("sndioGetFmt: bits = %u, le = %u, msb = %u, bps = %u\n",
-+		    sio->bits, sio->le, sio->msb, sio->bps);
-+		return 0;
-+	}
-+
-+	switch (sio->bits) {
-+	case 32:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt32;
-+		break;
-+	case 24:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = (sio->bps == 3) ? paInt24 : paInt32;
-+		break;
-+	case 16:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt16;
-+		break;
-+	case 8:
-+		*fmt = sio->sig ? paInt8 : paUInt8;
-+		break;
-+	default:
-+		DPR("sndioGetFmt: %u: unsupported\n", sio->bits);
-+		return 0;
-+	}
-+	return 1;
-+}
-+
-+/*
-+ * I/O loop for callback interface
-+ */
-+static void *
-+sndioThread(void *arg)
-+{
-+	PaSndioStream *s = (PaSndioStream *)arg;
-+	PaStreamCallbackTimeInfo ti;
-+	unsigned char *data;
-+	unsigned todo, rblksz, wblksz;
-+	int n, result;
-+	
-+	rblksz = s->par.round * s->par.rchan * s->par.bps;
-+	wblksz = s->par.round * s->par.pchan * s->par.bps;
-+	
-+	DPR("sndioThread: mode = %x, round = %u, rblksz = %u, wblksz = %u\n",
-+	    s->mode, s->par.round, rblksz, wblksz);
-+	
-+	while (!s->stopped) {
-+		if (s->mode & SIO_REC) {
-+			todo = rblksz;
-+			data = s->rbuf;
-+			while (todo > 0) {
-+				n = sio_read(s->hdl, data, todo);
-+				if (n == 0) {
-+					DPR("sndioThread: sio_read failed\n");
-+					goto failed;
-+				}
-+				todo -= n;
-+				data += n;
-+			}
-+			s->rpos += s->par.round;
-+			ti.inputBufferAdcTime = 
-+			    (double)s->realpos / s->par.rate;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			ti.outputBufferDacTime =
-+			    (double)(s->realpos + s->par.bufsz) / s->par.rate;
-+		}
-+		ti.currentTime = s->realpos / (double)s->par.rate;
-+		PaUtil_BeginBufferProcessing(&s->bufproc, &ti, 0);
-+		if (s->mode & SIO_PLAY) {
-+			PaUtil_SetOutputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedOutputChannels(&s->bufproc,
-+			    0, s->wbuf, s->par.pchan);
-+		}
-+		if (s->mode & SIO_REC) {
-+			PaUtil_SetInputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedInputChannels(&s->bufproc,
-+			    0, s->rbuf, s->par.rchan);
-+		}
-+		result = paContinue;
-+		n = PaUtil_EndBufferProcessing(&s->bufproc, &result);
-+		if (n != s->par.round) {
-+			DPR("sndioThread: %d < %u frames, result = %d\n",
-+			    n, s->par.round, result);
-+		}
-+		if (result != paContinue) {
-+			break;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			n = sio_write(s->hdl, s->wbuf, wblksz);
-+			if (n < wblksz) {
-+				DPR("sndioThread: sio_write failed\n");
-+				goto failed;
-+			}
-+			s->wpos += s->par.round;
-+		}
-+	}
-+ failed:
-+	s->active = 0;
-+	DPR("sndioThread: done\n");
-+}
-+
-+static PaError
-+OpenStream(struct PaUtilHostApiRepresentation *hostApi,
-+    PaStream **stream,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate,
-+    unsigned long framesPerBuffer,
-+    PaStreamFlags streamFlags,
-+    PaStreamCallback *streamCallback,
-+    void *userData)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	PaSndioStream *s;
-+	PaError err;
-+	struct sio_hdl *hdl;
-+	struct sio_par par;
-+	unsigned mode;
-+	int inch, onch;
-+	PaSampleFormat ifmt, ofmt, siofmt;
-+	const char *dev;
-+
-+	DPR("OpenStream:\n");
-+
-+	mode = 0;
-+	inch = onch = 0;
-+	ifmt = ofmt = 0;
-+	sio_initpar(&par);
-+
-+	if (outputPar && outputPar->channelCount > 0) {
-+		if (outputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad output device\n", outputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (outputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: output specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, outputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ofmt = outputPar->sampleFormat;
-+		onch = par.pchan = outputPar->channelCount;
-+		mode |= SIO_PLAY;
-+	}
-+	if (inputPar && inputPar->channelCount > 0) {
-+		if (inputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad input device\n", inputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (inputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: input specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, inputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ifmt = inputPar->sampleFormat;
-+		inch = par.rchan = inputPar->channelCount;
-+		mode |= SIO_REC;
-+	}
-+	par.rate = sampleRate;
-+	if (framesPerBuffer != paFramesPerBufferUnspecified)
-+		par.round = framesPerBuffer;
-+
-+	DPR("OpenStream: mode = %x, trying rate = %u\n", mode, par.rate);
-+
-+	if (outputPar) {
-+		dev = sndioHostApi->device_info[outputPar->device].name;
-+	} else if (inputPar) {
-+		dev = sndioHostApi->device_info[inputPar->device].name;
-+	} else {
-+		return paUnanticipatedHostError;
-+	}
-+	hdl = sio_open(dev, mode, 0);
-+	if (hdl == NULL)
-+		return paUnanticipatedHostError;
-+	if (!sio_setpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sio_getpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sndioGetFmt(&par, &siofmt)) {
-+		sio_close(hdl);
-+		return paSampleFormatNotSupported;
-+	}
-+	if ((mode & SIO_REC) && par.rchan != inputPar->channelCount) {
-+		DPR("OpenStream: rchan(%u) != %d\n", par.rchan, inputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((mode & SIO_PLAY) && par.pchan != outputPar->channelCount) {
-+		DPR("OpenStream: pchan(%u) != %d\n", par.pchan, outputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((double)par.rate < sampleRate * 0.995 ||
-+	    (double)par.rate > sampleRate * 1.005) {
-+		DPR("OpenStream: rate(%u) != %g\n", par.rate, sampleRate);
-+		sio_close(hdl);
-+		return paInvalidSampleRate;
-+	}
-+	
-+	s = (PaSndioStream *)PaUtil_AllocateMemory(sizeof(PaSndioStream));
-+	if (s == NULL) {
-+		sio_close(hdl);
-+		return paInsufficientMemory;
-+	}
-+	PaUtil_InitializeStreamRepresentation(&s->base, 
-+	    streamCallback ? &sndioHostApi->callback : &sndioHostApi->blocking,
-+	    streamCallback, userData);
-+	DPR("inch = %d, onch = %d, ifmt = %x, ofmt = %x\n", 
-+	    inch, onch, ifmt, ofmt);
-+	err = PaUtil_InitializeBufferProcessor(&s->bufproc,
-+	    inch, ifmt, siofmt,
-+	    onch, ofmt, siofmt,
-+	    sampleRate,
-+	    streamFlags,
-+	    framesPerBuffer,
-+	    par.round,
-+	    paUtilFixedHostBufferSize, 
-+	    streamCallback, userData);
-+	if (err) {
-+		DPR("OpenStream: PaUtil_InitializeBufferProcessor failed\n");
-+		PaUtil_FreeMemory(s);
-+		sio_close(hdl);
-+		return err;
-+	}
-+	if (mode & SIO_REC) {
-+		s->rbuf = malloc(par.round * par.rchan * par.bps);
-+		if (s->rbuf == NULL) {
-+			DPR("OpenStream: failed to allocate rbuf\n");
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}
-+	if (mode & SIO_PLAY) {
-+		s->wbuf = malloc(par.round * par.pchan * par.bps);
-+		if (s->wbuf == NULL) {
-+			DPR("OpenStream: failed to allocate wbuf\n");
-+			free(s->rbuf);
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}	
-+	s->base.streamInfo.inputLatency = 0;
-+	s->base.streamInfo.outputLatency = (mode & SIO_PLAY) ?
-+	    (double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatencyFrames(&s->bufproc)) / (double)par.rate : 0;
-+	s->base.streamInfo.sampleRate = par.rate;
-+	s->active = 0;
-+	s->stopped = 1;
-+	s->mode = mode;
-+	s->hdl = hdl;
-+	s->par = par;
-+	*stream = s;	
-+	DPR("OpenStream: done\n");
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingReadStream(PaStream *stream, void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res, todo;
-+	void *buf;
-+	
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		buf = s->rbuf;
-+		todo = n * s->par.rchan * s->par.bps;
-+		while (todo > 0) {
-+			res = sio_read(s->hdl, buf, todo);
-+			if (res == 0)
-+				return paUnanticipatedHostError;
-+			buf = (char *)buf + res;
-+			todo -= res;
-+		}
-+		s->rpos += n;
-+		PaUtil_SetInputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedInputChannels(&s->bufproc, 0, s->rbuf, s->par.rchan);
-+		res = PaUtil_CopyInput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingReadStream: copyInput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingWriteStream(PaStream* stream, const void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res;
-+
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		PaUtil_SetOutputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedOutputChannels(&s->bufproc, 0, s->wbuf, s->par.pchan);
-+		res = PaUtil_CopyOutput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingWriteStream: copyOutput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		res = sio_write(s->hdl, s->wbuf, n * s->par.pchan * s->par.bps);
-+		if (res == 0)
-+			return paUnanticipatedHostError;		
-+		s->wpos += n;
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static signed long
-+BlockingGetStreamReadAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLIN);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLIN))
-+		return 0;
-+
-+	return s->realpos - s->rpos;
-+}
-+
-+static signed long
-+BlockingGetStreamWriteAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLOUT);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLOUT))
-+		return 0;
-+
-+	return s->par.bufsz - (s->wpos - s->realpos);
-+}
-+
-+static PaError
-+BlockingWaitEmpty( PaStream *stream )
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	/*
-+	 * drain playback buffers; sndio always does it in background
-+	 * and there is no way to wait for completion
-+	 */
-+	DPR("BlockingWaitEmpty: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return paNoError;
-+}
-+
-+static PaError
-+StartStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned primes, wblksz;
-+	int err;
-+
-+	DPR("StartStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (!s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 0;
-+	s->active = 1;
-+	s->realpos = 0;
-+	s->wpos = 0;
-+	s->rpos = 0;
-+	PaUtil_ResetBufferProcessor(&s->bufproc);
-+	if (!sio_start(s->hdl))
-+		return paUnanticipatedHostError;
-+
-+	/*
-+	 * send a complete buffer of silence
-+	 */
-+	if (s->mode & SIO_PLAY) {
-+		wblksz = s->par.round * s->par.pchan * s->par.bps;
-+		memset(s->wbuf, 0, wblksz);
-+		for (primes = s->par.bufsz / s->par.round; primes > 0; primes--)
-+			s->wpos += sio_write(s->hdl, s->wbuf, wblksz);
-+	}
-+	if (s->base.streamCallback) {
-+		err = pthread_create(&s->thread, NULL, sndioThread, s);
-+		if (err) {
-+			DPR("SndioStartStream: couldn't create thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+		DPR("StartStream: started...\n");
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+StopStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	void *ret;
-+	int err;
-+
-+	DPR("StopStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 1;
-+	if (s->base.streamCallback) {
-+		err = pthread_join(s->thread, &ret);
-+		if (err) {
-+			DPR("SndioStop: couldn't join thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+	}
-+	if (!sio_stop(s->hdl))
-+		return paUnanticipatedHostError;
-+	return paNoError;
-+}
-+
-+static PaError
-+CloseStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	DPR("CloseStream:\n");
-+
-+	if (!s->stopped)
-+		StopStream(stream);
-+
-+	if (s->mode & SIO_REC)
-+		free(s->rbuf);
-+	if (s->mode & SIO_PLAY)
-+		free(s->wbuf);
-+	sio_close(s->hdl);
-+        PaUtil_TerminateStreamRepresentation(&s->base);
-+	PaUtil_TerminateBufferProcessor(&s->bufproc);
-+	PaUtil_FreeMemory(s);
-+	return paNoError;
-+}
-+
-+static PaError
-+AbortStream(PaStream *stream)
-+{
-+	DPR("AbortStream:\n");
-+
-+	return StopStream(stream);
-+}
-+
-+static PaError
-+IsStreamStopped(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamStopped: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->stopped;
-+}
-+
-+static PaError
-+IsStreamActive(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamActive: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->active;
-+}
-+
-+static PaTime
-+GetStreamTime(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	return (double)s->realpos / s->base.streamInfo.sampleRate;
-+}
-+
-+static PaError
-+IsFormatSupported(struct PaUtilHostApiRepresentation *hostApi,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate)
-+{
-+	return paFormatIsSupported;
-+}
-+
-+static void
-+Terminate(struct PaUtilHostApiRepresentation *hostApi)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	free(sndioHostApi->audiodevices);
-+	PaUtil_FreeMemory(hostApi);
-+}
-+
-+static void
-+InitDeviceInfo(PaDeviceInfo *info, PaHostApiIndex hostApiIndex, const char *name)
-+{
-+	info->structVersion = 2;
-+	info->name = name;
-+	info->hostApi = hostApiIndex;
-+	info->maxInputChannels = 128;
-+	info->maxOutputChannels = 128;
-+	info->defaultLowInputLatency = 0.01;
-+	info->defaultLowOutputLatency = 0.01;
-+	info->defaultHighInputLatency = 0.5;
-+	info->defaultHighOutputLatency = 0.5;
-+	info->defaultSampleRate = 48000;
-+}
-+
-+PaError
-+PaSndio_Initialize(PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	PaDeviceInfo *info;
-+	struct sio_hdl *hdl;
-+	char *audiodevices;
-+	char *device;
-+	size_t deviceCount;
-+
-+	DPR("PaSndio_Initialize: initializing...\n");
-+
-+	if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) == NULL)
-+		return paNoError;
-+	sio_close(hdl);
-+	/* unusable APIs should return paNoError and a NULL hostApi */
-+	*hostApi = NULL;
-+
-+	sndioHostApi = PaUtil_AllocateMemory(sizeof(PaSndioHostApiRepresentation));
-+	if (sndioHostApi == NULL)
-+		return paNoError;
-+
-+	// Add default device
-+	info = &sndioHostApi->device_info[0];
-+	InitDeviceInfo(info, hostApiIndex, SIO_DEVANY);
-+	sndioHostApi->infos[0] = info;
-+	deviceCount = 1;
-+
-+	// Add additional devices as specified in the PA_SNDIO_AUDIODEVICES
-+	// environment variable as a colon separated list
-+	sndioHostApi->audiodevices = NULL;
-+	audiodevices = getenv("PA_SNDIO_AUDIODEVICES");
-+	if (audiodevices != NULL) {
-+		sndioHostApi->audiodevices = strdup(audiodevices);
-+		if (sndioHostApi->audiodevices == NULL)
-+			return paNoError;
-+
-+		audiodevices = sndioHostApi->audiodevices;
-+		while ((device = strsep(&audiodevices, ":")) != NULL &&
-+			deviceCount < PA_SNDIO_AUDIODEVICES_MAX) {
-+			if (*device == '\0')
-+				continue;
-+			info = &sndioHostApi->device_info[deviceCount];
-+			InitDeviceInfo(info, hostApiIndex, device);
-+			sndioHostApi->infos[deviceCount] = info;
-+			deviceCount++;
-+		}
-+	}
-+
-+	*hostApi = &sndioHostApi->base;
-+	(*hostApi)->info.structVersion = 1;
-+	(*hostApi)->info.type = paSndio;
-+	(*hostApi)->info.name = "sndio";
-+	(*hostApi)->info.deviceCount = deviceCount;
-+	(*hostApi)->info.defaultInputDevice = 0;
-+	(*hostApi)->info.defaultOutputDevice = 0;
-+	(*hostApi)->deviceInfos = sndioHostApi->infos;
-+	(*hostApi)->Terminate = Terminate;
-+	(*hostApi)->OpenStream = OpenStream;
-+	(*hostApi)->IsFormatSupported = IsFormatSupported;
-+	
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->blocking,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    BlockingReadStream,
-+	    BlockingWriteStream,
-+	    BlockingGetStreamReadAvailable,
-+	    BlockingGetStreamWriteAvailable);
-+
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->callback,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    PaUtil_DummyRead,
-+	    PaUtil_DummyWrite,
-+	    PaUtil_DummyGetReadAvailable,
-+	    PaUtil_DummyGetWriteAvailable);
-+
-+	DPR("PaSndio_Initialize: done\n");
-+	return paNoError;
-+}
-diff --git a/src/os/unix/pa_unix_hostapis.c b/src/os/unix/pa_unix_hostapis.c
-index a9b4a05..f10ced1 100644
---- a/src/os/unix/pa_unix_hostapis.c
-+++ b/src/os/unix/pa_unix_hostapis.c
-@@ -44,6 +44,7 @@
- 
- PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-+PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- /* Added for IRIX, Pieter, oct 2, 2003: */
- PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-@@ -57,6 +58,10 @@ PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiI
- 
- PaUtilHostApiInitializer *paHostApiInitializers[] =
-     {
-+#ifdef PA_USE_SNDIO
-+	    PaSndio_Initialize,
-+#endif
-+
- #ifdef __linux__
- 
- #if PA_USE_ALSA
--- 
-2.27.0
-
diff --git a/srcpkgs/portaudio/template b/srcpkgs/portaudio/template
index 54dcd9a7215504..fe087e9f24f16c 100644
--- a/srcpkgs/portaudio/template
+++ b/srcpkgs/portaudio/template
@@ -1,23 +1,19 @@
 # Template file for 'portaudio'
 pkgname=portaudio
-version=190600.20161030
-revision=6
+version=190700.20210406
+revision=1
 build_style=gnu-configure
-configure_args="--enable-cxx --with-jack $(vopt_enable sndio)"
+configure_args="--enable-cxx --with-jack --with-sndio"
 hostmakedepends="pkg-config"
-makedepends="alsa-lib-devel jack-devel $(vopt_if sndio sndio-devel)"
+makedepends="alsa-lib-devel jack-devel sndio-devel"
 short_desc="Portable cross-platform audio I/O library"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="http://www.portaudio.com"
-distfiles="http://www.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
-checksum=f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513
+homepage="https://www.portaudio.com"
+distfiles="https://files.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
+checksum=47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def
 disable_parallel_build=yes
 
-# sndio disabled by default: non-upstream patch
-build_options="sndio"
-build_options_default=""
-
 post_install() {
 	vlicense LICENSE.txt
 }

From 0165c81028b35a7e781589650d01a4a1ba5af1b5 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:27 +0600
Subject: [PATCH 4/6] sqlite: update to 3.45.3.

---
 srcpkgs/sqlite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sqlite/template b/srcpkgs/sqlite/template
index 1d548eb479560b..4ae8fd4d281465 100644
--- a/srcpkgs/sqlite/template
+++ b/srcpkgs/sqlite/template
@@ -1,6 +1,6 @@
 # Template file for 'sqlite'
 pkgname=sqlite
-version=3.45.2
+version=3.45.3
 revision=1
 _amalgamationver=$(printf "%d%02d%02d00\n" ${version//./ })
 build_style=gnu-configure
@@ -12,7 +12,7 @@ license="Public Domain"
 homepage="https://sqlite.org/"
 changelog="https://www.sqlite.org/changes.html"
 distfiles="https://sqlite.org/2024/sqlite-autoconf-${_amalgamationver}.tar.gz"
-checksum=bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae
+checksum=b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531
 
 CFLAGS="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE \

From 4b1371cb0b841d74c8e62f68e986063ea708809c Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:32 +0600
Subject: [PATCH 5/6] suil: update to 0.10.20.

---
 srcpkgs/suil/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/suil/template b/srcpkgs/suil/template
index 680e1972cd4371..58d7d4aceee052 100644
--- a/srcpkgs/suil/template
+++ b/srcpkgs/suil/template
@@ -1,8 +1,8 @@
 # Template file for 'suil'
 pkgname=suil
-version=0.10.12
+version=0.10.20
 revision=1
-build_style=waf3
+build_style=meson
 hostmakedepends="pkg-config lv2"
 makedepends="gtk+-devel qt5-devel gtk+3-devel"
 short_desc="Lightweight C library for loading and wrapping LV2 plugin UIs"
@@ -10,8 +10,8 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://drobilla.net/software/suil.html"
 changelog="https://gitlab.com/lv2/suil/-/raw/master/NEWS"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=daa763b231b22a1f532530d3e04c1fae48d1e1e03785e23c9ac138f207b87ecd
+distfiles="https://download.drobilla.net/suil-${version}.tar.xz"
+checksum=334a3ed3e73d5e17ff400b3db9801f63809155b0faa8b1b9046f9dd3ffef934e
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-host-tools qt5-devel"

From 6274b998d0253ceddd8adc049a007e9dd45134b5 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:39 +0600
Subject: [PATCH 6/6] wavpack: update to 5.7.0.

---
 srcpkgs/wavpack/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wavpack/template b/srcpkgs/wavpack/template
index d9b0f68f014bda..c6c65770f0d7fc 100644
--- a/srcpkgs/wavpack/template
+++ b/srcpkgs/wavpack/template
@@ -1,6 +1,6 @@
 # Template file for 'wavpack'
 pkgname=wavpack
-version=5.6.0
+version=5.7.0
 revision=1
 build_style=gnu-configure
 configure_args="--enable-static"
@@ -10,7 +10,7 @@ license="BSD-3-Clause"
 homepage="https://www.wavpack.com/"
 changelog="https://raw.githubusercontent.com/dbry/WavPack/master/NEWS"
 distfiles="https://www.wavpack.com/wavpack-${version}.tar.bz2"
-checksum=8cbfa15927d29bcf953db35c0cfca7424344ff43ebe4083daf161577fb839cc1
+checksum=8944b237968a1b3976a1eb47cd556916e041a2aa8917495db65f82c3fcc2a225
 
 case "$XBPS_TARGET_MACHINE" in
 	armv5*) configure_args+=" --disable-asm";;

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [WIP] audacity: update to 3.5.1. Update audacity and deps
  2024-04-26 17:50 [PR PATCH] audacity: update to 3.5.1. Update audacity and deps iFoundSilentHouse
                   ` (3 preceding siblings ...)
  2024-04-26 22:14 ` iFoundSilentHouse
@ 2024-04-26 22:16 ` iFoundSilentHouse
  2024-04-26 23:13 ` [PR PATCH] [Updated] " iFoundSilentHouse
  5 siblings, 0 replies; 7+ messages in thread
From: iFoundSilentHouse @ 2024-04-26 22:16 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 193 bytes --]

New comment by iFoundSilentHouse on void-packages repository

https://github.com/void-linux/void-packages/pull/50047#issuecomment-2080184389

Comment:
i686 doesn't build without `-msse2` CFLAG

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PR PATCH] [Updated] audacity: update to 3.5.1. Update audacity and deps
  2024-04-26 17:50 [PR PATCH] audacity: update to 3.5.1. Update audacity and deps iFoundSilentHouse
                   ` (4 preceding siblings ...)
  2024-04-26 22:16 ` iFoundSilentHouse
@ 2024-04-26 23:13 ` iFoundSilentHouse
  5 siblings, 0 replies; 7+ messages in thread
From: iFoundSilentHouse @ 2024-04-26 23:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 750 bytes --]

There is an updated pull request by iFoundSilentHouse against master on the void-packages repository

https://github.com/iFoundSilentHouse/void-packages audacity-3.5
https://github.com/void-linux/void-packages/pull/50047

audacity: update to 3.5.1. Update audacity and deps
- I tested the changes in this PR: **YES**
- I built this PR locally for my native architecture, (x86_64-glibc)

Lilv dyn-manifest change: https://github.com/lv2/lilv/commit/17f6705ae6d0e8c7202f598f5271786a00a065be
Portaudio patches: https://github.com/PortAudio/portaudio/commit/45c12e8d18ae4434000ed1521e49d9b5ef91dedf
 new audacity works fine without `audacity-compat.patch`


A patch file from https://github.com/void-linux/void-packages/pull/50047.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-audacity-3.5-50047.patch --]
[-- Type: text/x-diff, Size: 45597 bytes --]

From cde3d78facb736b8c2ed941ad36f3b4686897a16 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 19:11:47 +0600
Subject: [PATCH 1/6] audacity: update to 3.5.1.

---
 srcpkgs/audacity/template | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/audacity/template b/srcpkgs/audacity/template
index 7b838119ab2611..5638cf19b8ef6b 100644
--- a/srcpkgs/audacity/template
+++ b/srcpkgs/audacity/template
@@ -1,6 +1,6 @@
 # Template file for 'audacity'
 pkgname=audacity
-version=3.4.2
+version=3.5.1
 revision=1
 build_style=cmake
 build_helper="cmake-wxWidgets-gtk3 qemu"
@@ -25,7 +25,11 @@ license="GPL-2.0-or-later, GPL-3.0-or-later, CC-BY-3.0"
 homepage="https://www.audacityteam.org"
 changelog="https://github.com/audacity/audacity/raw/master/CHANGELOG.txt"
 distfiles="https://github.com/audacity/audacity/releases/download/Audacity-${version}/audacity-sources-${version}.tar.gz"
-checksum=f28dd718d2c5a2aa9f207b8351443a90c1f02b65378ca94bcc7febda42635e48
+checksum=8786a1be8d63f4793fc3f2a5f1f61c441e0a4b9a7ed9137d59277ad5f72bd512
+
+case "$XBPS_TARGET_MACHINE" in
+	i686*) CFLAGS="-msse2";;
+esac
 
 CXXFLAGS="-D_FILE_OFFSET_BITS=64"
 

From b1aa8ae157ec1b31270b1ed9763fa92c7a70ad8a Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:06 +0600
Subject: [PATCH 2/6] lilv: update to 0.24.24.

---
 srcpkgs/lilv/template | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/srcpkgs/lilv/template b/srcpkgs/lilv/template
index 57f4bc30b9501b..bf03429f42c1e9 100644
--- a/srcpkgs/lilv/template
+++ b/srcpkgs/lilv/template
@@ -1,18 +1,18 @@
 # Template file for 'lilv'
 pkgname=lilv
-version=0.24.12
-revision=4
-build_style=waf3
-configure_args="--dyn-manifest"
+version=0.24.24
+revision=1
+build_style=meson
 hostmakedepends="pkg-config"
 makedepends="python3-devel serd-devel sord-devel sratom-devel libsndfile-devel
  lv2"
 short_desc="Simple yet powerful C API for using LV2 plugins"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="ISC"
-homepage="http://drobilla.net/software/lilv/"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=26a37790890c9c1f838203b47f5b2320334fe92c02a4d26ebbe2669dbd769061
+homepage="https://drobilla.net/software/lilv.html"
+changelog="https://raw.githubusercontent.com/lv2/lilv/master/NEWS"
+distfiles="https://download.drobilla.net/lilv-${version}.tar.xz"
+checksum=6bb6be9f88504176d0642f12de809b2b9e2dc55621a68adb8c7edb99aefabb4f
 
 post_install() {
 	vlicense COPYING
@@ -31,7 +31,8 @@ lilv-bash-completion_package() {
 	depends="bash-completion lilv"
 	short_desc+=" - Bash completion for Lilv"
 	pkg_install() {
-		vcompletion utils/lilv.bash_completion bash
+		vcompletion ${DESTDIR}/etc/bash_completion.d/lilv bash
+		rm -r ${DESTDIR}/etc
 	}
 }
 

From 61b6891cd9b58356916d0eebb56b60e380222695 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:14 +0600
Subject: [PATCH 3/6] portaudio: update to 190700.20210406.

---
 .../portaudio/patches/audacity-compat.patch   | 344 -------
 srcpkgs/portaudio/patches/sndio.patch         | 883 ------------------
 srcpkgs/portaudio/template                    |  12 +-
 3 files changed, 5 insertions(+), 1234 deletions(-)
 delete mode 100644 srcpkgs/portaudio/patches/audacity-compat.patch
 delete mode 100644 srcpkgs/portaudio/patches/sndio.patch

diff --git a/srcpkgs/portaudio/patches/audacity-compat.patch b/srcpkgs/portaudio/patches/audacity-compat.patch
deleted file mode 100644
index eb89f0a6346db2..00000000000000
--- a/srcpkgs/portaudio/patches/audacity-compat.patch
+++ /dev/null
@@ -1,344 +0,0 @@
-Source: https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/patches/portaudio-audacity-compat.patch
-Upstream: No
-Reason: Audacity needs Pa_GetStreamHostApiType to use system wide portaudio
-
-
-diff --git a/configure.in b/configure.in
-index 13816fb..83c239a 100644
---- a/configure.in
-+++ b/configure.in
-@@ -420,6 +420,7 @@ case "${host_os}" in
-                    DLL_LIBS="$DLL_LIBS -lossaudio"
-                    LIBS="$LIBS -lossaudio"
-            fi
-+           INCLUDES="$INCLUDES pa_unix_oss.h"
-            AC_DEFINE(PA_USE_OSS,1)
-         fi
- 
-diff --git a/include/pa_unix_oss.h b/include/pa_unix_oss.h
-new file mode 100644
-index 0000000..64e04cb
---- /dev/null
-+++ b/include/pa_unix_oss.h
-@@ -0,0 +1,104 @@
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-+#ifndef PA_UNIX_OSS_H
-+#define PA_UNIX_OSS_H
-+
-+/*
-+ * $Id: portaudio.patch,v 1.10 2009-06-30 04:52:59 llucius Exp $
-+ * PortAudio Portable Real-Time Audio Library
-+ * OSS-specific extensions
-+ *
-+ * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files
-+ * (the "Software"), to deal in the Software without restriction,
-+ * including without limitation the rights to use, copy, modify, merge,
-+ * publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so,
-+ * subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be
-+ * included in all copies or substantial portions of the Software.
-+ *
-+ * Any person wishing to distribute modifications to the Software is
-+ * requested to send the modifications to the original developer so that
-+ * they can be incorporated into the canonical version.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
-+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
-+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-+ *
-+ */
-+
-+/** @file
-+ * OSS-specific PortAudio API extension header file.
-+ */
-+
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-+
-+const char *PaOSS_GetStreamInputDevice( PaStream *s );
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream *s );
-+
-+#ifdef __cplusplus
-+}
-+#endif
-+
-+#endif
-diff --git a/include/pa_win_ds.h b/include/pa_win_ds.h
-index 5d38641..ba1c245 100644
---- a/include/pa_win_ds.h
-+++ b/include/pa_win_ds.h
-@@ -86,6 +86,21 @@ typedef struct PaWinDirectSoundStreamInfo{
- 
- }PaWinDirectSoundStreamInfo;
- 
-+/** Retrieve the GUID of the input device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamInputGUID( PaStream* s );
-+
-+/** Retrieve the GUID of the output device.
-+
-+ @param stream The stream to query.
-+
-+ @return A pointer to the GUID, or NULL if none.
-+*/
-+LPGUID PaWinDS_GetStreamOutputGUID( PaStream* s );
- 
- 
- #ifdef __cplusplus
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 8a94aaf..9c8a295 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -1197,6 +1197,15 @@ signed long Pa_GetStreamReadAvailable( PaStream* stream );
- signed long Pa_GetStreamWriteAvailable( PaStream* stream );
- 
- 
-+/** Retrieve the host type handling an open stream.
-+
-+ @return Returns a non-negative value representing the host API type
-+ handling an open stream or, a PaErrorCode (which are always negative)
-+ if PortAudio is not initialized or an error is encountered.
-+*/
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream );
-+
-+
- /* Miscellaneous utilities */
- 
- 
-diff --git a/src/common/pa_front.c b/src/common/pa_front.c
-index 188cee9..52f44a6 100644
---- a/src/common/pa_front.c
-+++ b/src/common/pa_front.c
-@@ -1257,8 +1257,10 @@ PaError Pa_OpenStream( PaStream** stream,
-                                   hostApiInputParametersPtr, hostApiOutputParametersPtr,
-                                   sampleRate, framesPerBuffer, streamFlags, streamCallback, userData );
- 
--    if( result == paNoError )
-+    if( result == paNoError ) {
-         AddOpenStream( *stream );
-+        PA_STREAM_REP(*stream)->hostApiType = hostApi->info.type;
-+    }
- 
- 
-     PA_LOGAPI(("Pa_OpenStream returned:\n" ));
-@@ -1770,6 +1772,32 @@ signed long Pa_GetStreamWriteAvailable( PaStream* stream )
-     return result;
- }
- 
-+PaHostApiTypeId Pa_GetStreamHostApiType( PaStream* stream )
-+{
-+    PaError error = PaUtil_ValidateStreamPointer( stream );
-+    PaHostApiTypeId result;
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType called:\n" );
-+    PaUtil_DebugPrint("\tPaStream* stream: 0x%p\n", stream );
-+#endif
-+
-+    if( error == paNoError )
-+    {
-+        result = PA_STREAM_REP(stream)->hostApiType;
-+    }
-+    else
-+    {
-+        result = (PaHostApiTypeId) error;
-+    }
-+
-+#ifdef PA_LOG_API_CALLS
-+    PaUtil_DebugPrint("Pa_GetStreamHostApiType returned:\n" );
-+    PaUtil_DebugPrint("\tPaError: %d ( %s )\n\n", result, Pa_GetErrorText( result ) );
-+#endif
-+
-+    return result;
-+}
- 
- PaError Pa_GetSampleSize( PaSampleFormat format )
- {
-diff --git a/src/common/pa_stream.c b/src/common/pa_stream.c
-index 03a0ee6..c4376f9 100644
---- a/src/common/pa_stream.c
-+++ b/src/common/pa_stream.c
-@@ -93,6 +93,8 @@ void PaUtil_InitializeStreamRepresentation( PaUtilStreamRepresentation *streamRe
-     streamRepresentation->streamInfo.inputLatency = 0.;
-     streamRepresentation->streamInfo.outputLatency = 0.;
-     streamRepresentation->streamInfo.sampleRate = 0.;
-+
-+    streamRepresentation->hostApiType = 0;
- }
- 
- 
-diff --git a/src/common/pa_stream.h b/src/common/pa_stream.h
-index 678e2ad..70572c7 100644
---- a/src/common/pa_stream.h
-+++ b/src/common/pa_stream.h
-@@ -152,6 +152,7 @@ typedef struct PaUtilStreamRepresentation {
-     PaStreamFinishedCallback *streamFinishedCallback;
-     void *userData;
-     PaStreamInfo streamInfo;
-+    PaHostApiTypeId hostApiType;
- } PaUtilStreamRepresentation;
- 
- 
-diff --git a/src/hostapi/alsa/pa_linux_alsa.c b/src/hostapi/alsa/pa_linux_alsa.c
-index 584cde8..558fb3d 100644
---- a/src/hostapi/alsa/pa_linux_alsa.c
-+++ b/src/hostapi/alsa/pa_linux_alsa.c
-@@ -621,6 +621,7 @@ typedef struct
-     StreamDirection streamDir;
- 
-     snd_pcm_channel_area_t *channelAreas;  /* Needed for channel adaption */
-+    int card;
- } PaAlsaStreamComponent;
- 
- /* Implementation specific stream structure */
-@@ -1873,6 +1874,7 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
- {
-     PaError result = paNoError;
-     PaSampleFormat userSampleFormat = params->sampleFormat, hostSampleFormat = paNoError;
-+    snd_pcm_info_t* pcmInfo;
-     assert( params->channelCount > 0 );
- 
-     /* Make sure things have an initial value */
-@@ -1900,6 +1902,9 @@ static PaError PaAlsaStreamComponent_Initialize( PaAlsaStreamComponent *self, Pa
-     self->device = params->device;
- 
-     PA_ENSURE( AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm ) );
-+
-+    snd_pcm_info_alloca( &pcmInfo );
-+    self->card = snd_pcm_info_get_card( pcmInfo );
-     self->nfds = alsa_snd_pcm_poll_descriptors_count( self->pcm );
- 
-     PA_ENSURE( hostSampleFormat = PaUtil_SelectClosestAvailableFormat( GetAvailableFormats( self->pcm ), userSampleFormat ) );
-@@ -4605,9 +4610,7 @@ PaError PaAlsa_GetStreamInputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->capture.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->capture.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->capture.card;
- 
- error:
-     return result;
-@@ -4624,9 +4627,7 @@ PaError PaAlsa_GetStreamOutputCard( PaStream* s, int* card )
-     /* XXX: More descriptive error? */
-     PA_UNLESS( stream->playback.pcm, paDeviceUnavailable );
- 
--    alsa_snd_pcm_info_alloca( &pcmInfo );
--    PA_ENSURE( alsa_snd_pcm_info( stream->playback.pcm, pcmInfo ) );
--    *card = alsa_snd_pcm_info_get_card( pcmInfo );
-+    *card = stream->playback.card;
- 
- error:
-     return result;
-diff --git a/src/hostapi/coreaudio/pa_mac_core_blocking.c b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-index 679c6ba..a69e085 100644
---- a/src/hostapi/coreaudio/pa_mac_core_blocking.c
-+++ b/src/hostapi/coreaudio/pa_mac_core_blocking.c
-@@ -66,6 +66,9 @@
- #ifdef MOSX_USE_NON_ATOMIC_FLAG_BITS
- # define OSAtomicOr32( a, b ) ( (*(b)) |= (a) )
- # define OSAtomicAnd32( a, b ) ( (*(b)) &= (a) )
-+#elif MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_3
-+# define OSAtomicOr32( a, b ) BitOrAtomic( a, (UInt32 *) b )
-+# define OSAtomicAnd32( a, b ) BitAndAtomic( a, (UInt32 *) b )
- #else
- # include <libkern/OSAtomic.h>
- #endif
-diff --git a/src/hostapi/oss/pa_unix_oss.c b/src/hostapi/oss/pa_unix_oss.c
-index 51e9630..f257d80 100644
---- a/src/hostapi/oss/pa_unix_oss.c
-+++ b/src/hostapi/oss/pa_unix_oss.c
-@@ -2043,3 +2043,26 @@ error:
- #endif
- }
- 
-+const char *PaOSS_GetStreamInputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->capture )
-+    {
-+      return stream->capture->devName;
-+    }
-+
-+   return NULL;
-+}
-+
-+const char *PaOSS_GetStreamOutputDevice( PaStream* s )
-+{
-+    PaOssStream *stream = (PaOssStream*)s;
-+
-+    if( stream->playback )
-+    {
-+      return stream->playback->devName;
-+    }
-+
-+   return NULL;
-+}
diff --git a/srcpkgs/portaudio/patches/sndio.patch b/srcpkgs/portaudio/patches/sndio.patch
deleted file mode 100644
index 9fc20960d58622..00000000000000
--- a/srcpkgs/portaudio/patches/sndio.patch
+++ /dev/null
@@ -1,883 +0,0 @@
-diff --git a/Makefile.in b/Makefile.in
-index 5e1a764..2747f73 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -44,7 +44,7 @@ PALIB = libportaudio.la
- PAINC = include/portaudio.h
- 
- PA_LDFLAGS = $(LDFLAGS) $(SHARED_FLAGS) -rpath $(libdir) -no-undefined \
--	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS)_.*" \
-+	     -export-symbols-regex "(Pa|PaMacCore|PaJack|PaAlsa|PaAsio|PaOSS|PaSndio)_.*" \
- 	     -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
- 
- COMMON_OBJS = \
-@@ -146,6 +146,7 @@ SRC_DIRS = \
- 	src/hostapi/dsound \
- 	src/hostapi/jack \
- 	src/hostapi/oss \
-+	src/hostapi/sndio \
- 	src/hostapi/wasapi \
- 	src/hostapi/wdmks \
- 	src/hostapi/wmme \
-diff --git a/configure.in b/configure.in
-index 83c239a..db11d65 100644
---- a/configure.in
-+++ b/configure.in
-@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
-             AS_HELP_STRING([--with-alsa], [Enable support for ALSA @<:@autodetect@:>@]),
-             [with_alsa=$withval])
- 
-+AC_ARG_WITH(sndio,
-+            AS_HELP_STRING([--with-sndio], [Enable support for sndio @<:@autodetect@:>@]),
-+            [with_sndio=$withval])
-+
- AC_ARG_WITH(jack,
-             AS_HELP_STRING([--with-jack], [Enable support for JACK @<:@autodetect@:>@]),
-             [with_jack=$withval])
-@@ -120,6 +124,10 @@ have_alsa=no
- if test "x$with_alsa" != "xno"; then
-     AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
- fi
-+have_sndio=no
-+if test "x$with_sndio" != "xno"; then
-+    AC_CHECK_LIB(sndio, sio_open, have_sndio=yes, have_sndio=no)
-+fi
- have_asihpi=no
- if test "x$with_asihpi" != "xno"; then
-     AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
-@@ -406,6 +414,13 @@ case "${host_os}" in
-            AC_DEFINE(PA_USE_ALSA,1)
-         fi
- 
-+        if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
-+            DLL_LIBS="$DLL_LIBS -lsndio"
-+            LIBS="$LIBS -lsndio"
-+            OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
-+            AC_DEFINE(PA_USE_SNDIO,1)
-+        fi
-+
-         if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
-            DLL_LIBS="$DLL_LIBS $JACK_LIBS"
-            CFLAGS="$CFLAGS $JACK_CFLAGS"
-@@ -510,6 +525,7 @@ case "$target_os" in
-         ;;
-      *)
- 	AC_MSG_RESULT([
-+  Sndio ....................... $have_sndio
-   OSS ......................... $have_oss
-   JACK ........................ $have_jack
- ])
-diff --git a/include/portaudio.h b/include/portaudio.h
-index 9c8a295..e535a02 100644
---- a/include/portaudio.h
-+++ b/include/portaudio.h
-@@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
-     paWDMKS=11,
-     paJACK=12,
-     paWASAPI=13,
--    paAudioScienceHPI=14
-+    paAudioScienceHPI=14,
-+    paSndio=15
- } PaHostApiTypeId;
- 
- 
-diff --git a/src/hostapi/sndio/pa_sndio.c b/src/hostapi/sndio/pa_sndio.c
-new file mode 100644
-index 0000000..725ef47
---- /dev/null
-+++ b/src/hostapi/sndio/pa_sndio.c
-@@ -0,0 +1,768 @@
-+/*
-+ * Copyright (c) 2009 Alexandre Ratchov <alex@caoua.org>
-+ *
-+ * Permission to use, copy, modify, and distribute this software for any
-+ * purpose with or without fee is hereby granted, provided that the above
-+ * copyright notice and this permission notice appear in all copies.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-+ */
-+#include <sys/types.h>
-+#include <pthread.h>
-+#include <poll.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <sndio.h>
-+
-+#include "pa_util.h"
-+#include "pa_hostapi.h"
-+#include "pa_stream.h"
-+#include "pa_process.h"
-+#include "pa_allocation.h"
-+
-+#if 0
-+#define DPR(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
-+#else
-+#define DPR(...) do {} while (0)
-+#endif
-+
-+/*
-+ * per-stream data
-+ */
-+typedef struct PaSndioStream
-+{
-+	PaUtilStreamRepresentation base;
-+	PaUtilBufferProcessor bufproc;	/* format conversion */
-+	struct sio_hdl *hdl;		/* handle for device i/o */
-+	struct sio_par par;		/* current device parameters */	
-+	unsigned mode;			/* SIO_PLAY, SIO_REC or both */
-+	int stopped;			/* stop requested or not started */
-+	int active;			/* thread is running */
-+	unsigned long long realpos;	/* frame number h/w is processing */
-+	char *rbuf, *wbuf;		/* bounce buffers for conversions */
-+	unsigned long long rpos, wpos;	/* bytes read/written */
-+	pthread_t thread;		/* thread of the callback interface */
-+} PaSndioStream;
-+
-+/*
-+ * api "class" data, common to all streams
-+ */
-+typedef struct PaSndioHostApiRepresentation
-+{
-+	PaUtilHostApiRepresentation base;
-+	PaUtilStreamInterface callback;
-+	PaUtilStreamInterface blocking;
-+	/*
-+	 * sndio has no device discovery mechanism and PortAudio has
-+	 * no way of accepting raw device strings from users.
-+	 * Normally we just expose the default device, which can be
-+	 * changed via the AUDIODEVICE environment variable, but we
-+	 * also allow specifying a list of up to 16 devices via the
-+	 * PA_SNDIO_AUDIODEVICES environment variable.
-+	 *
-+	 * Example:
-+	 * PA_SNDIO_AUDIODEVICES=default:snd/0.monitor:snd@remote/0
-+	 */
-+#define PA_SNDIO_AUDIODEVICES_MAX	16
-+	PaDeviceInfo device_info[PA_SNDIO_AUDIODEVICES_MAX];
-+	PaDeviceInfo *infos[PA_SNDIO_AUDIODEVICES_MAX];
-+	char *audiodevices;
-+} PaSndioHostApiRepresentation;
-+
-+/*
-+ * callback invoked when blocks are processed by the hardware
-+ */
-+static void
-+sndioOnMove(void *addr, int delta)
-+{
-+	PaSndioStream *s = (PaSndioStream *)addr;
-+
-+	s->realpos += delta;
-+}
-+
-+/*
-+ * convert PA encoding to sndio encoding, return true on success
-+ */
-+static int
-+sndioSetFmt(struct sio_par *sio, PaSampleFormat fmt)
-+{
-+	switch (fmt & ~paNonInterleaved) {
-+	case paInt32:
-+		sio->sig = 1;
-+		sio->bits = 32;
-+		break;
-+	case paInt24:
-+		sio->sig = 1;
-+		sio->bits = 24;
-+		sio->bps = 3;	/* paInt24 is packed format */
-+		break;
-+	case paInt16:
-+	case paFloat32:
-+		sio->sig = 1;
-+		sio->bits = 16;
-+		break;
-+	case paInt8:
-+		sio->sig = 1;
-+		sio->bits = 8;
-+		break;
-+	case paUInt8:
-+		sio->sig = 0;
-+		sio->bits = 8;
-+		break;
-+	default:
-+		DPR("sndioSetFmt: %x: unsupported\n", fmt);
-+		return 0;
-+	}
-+	sio->le = SIO_LE_NATIVE;
-+	return 1;
-+}
-+
-+/*
-+ * convert sndio encoding to PA encoding, return true on success
-+ */
-+static int
-+sndioGetFmt(struct sio_par *sio, PaSampleFormat *fmt)
-+{
-+	if ((sio->bps * 8 != sio->bits && !sio->msb) ||
-+	    (sio->bps > 1 && sio->le != SIO_LE_NATIVE)) {
-+		DPR("sndioGetFmt: bits = %u, le = %u, msb = %u, bps = %u\n",
-+		    sio->bits, sio->le, sio->msb, sio->bps);
-+		return 0;
-+	}
-+
-+	switch (sio->bits) {
-+	case 32:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt32;
-+		break;
-+	case 24:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = (sio->bps == 3) ? paInt24 : paInt32;
-+		break;
-+	case 16:
-+		if (!sio->sig)
-+			return 0;
-+		*fmt = paInt16;
-+		break;
-+	case 8:
-+		*fmt = sio->sig ? paInt8 : paUInt8;
-+		break;
-+	default:
-+		DPR("sndioGetFmt: %u: unsupported\n", sio->bits);
-+		return 0;
-+	}
-+	return 1;
-+}
-+
-+/*
-+ * I/O loop for callback interface
-+ */
-+static void *
-+sndioThread(void *arg)
-+{
-+	PaSndioStream *s = (PaSndioStream *)arg;
-+	PaStreamCallbackTimeInfo ti;
-+	unsigned char *data;
-+	unsigned todo, rblksz, wblksz;
-+	int n, result;
-+	
-+	rblksz = s->par.round * s->par.rchan * s->par.bps;
-+	wblksz = s->par.round * s->par.pchan * s->par.bps;
-+	
-+	DPR("sndioThread: mode = %x, round = %u, rblksz = %u, wblksz = %u\n",
-+	    s->mode, s->par.round, rblksz, wblksz);
-+	
-+	while (!s->stopped) {
-+		if (s->mode & SIO_REC) {
-+			todo = rblksz;
-+			data = s->rbuf;
-+			while (todo > 0) {
-+				n = sio_read(s->hdl, data, todo);
-+				if (n == 0) {
-+					DPR("sndioThread: sio_read failed\n");
-+					goto failed;
-+				}
-+				todo -= n;
-+				data += n;
-+			}
-+			s->rpos += s->par.round;
-+			ti.inputBufferAdcTime = 
-+			    (double)s->realpos / s->par.rate;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			ti.outputBufferDacTime =
-+			    (double)(s->realpos + s->par.bufsz) / s->par.rate;
-+		}
-+		ti.currentTime = s->realpos / (double)s->par.rate;
-+		PaUtil_BeginBufferProcessing(&s->bufproc, &ti, 0);
-+		if (s->mode & SIO_PLAY) {
-+			PaUtil_SetOutputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedOutputChannels(&s->bufproc,
-+			    0, s->wbuf, s->par.pchan);
-+		}
-+		if (s->mode & SIO_REC) {
-+			PaUtil_SetInputFrameCount(&s->bufproc, s->par.round);
-+			PaUtil_SetInterleavedInputChannels(&s->bufproc,
-+			    0, s->rbuf, s->par.rchan);
-+		}
-+		result = paContinue;
-+		n = PaUtil_EndBufferProcessing(&s->bufproc, &result);
-+		if (n != s->par.round) {
-+			DPR("sndioThread: %d < %u frames, result = %d\n",
-+			    n, s->par.round, result);
-+		}
-+		if (result != paContinue) {
-+			break;
-+		}
-+		if (s->mode & SIO_PLAY) {
-+			n = sio_write(s->hdl, s->wbuf, wblksz);
-+			if (n < wblksz) {
-+				DPR("sndioThread: sio_write failed\n");
-+				goto failed;
-+			}
-+			s->wpos += s->par.round;
-+		}
-+	}
-+ failed:
-+	s->active = 0;
-+	DPR("sndioThread: done\n");
-+}
-+
-+static PaError
-+OpenStream(struct PaUtilHostApiRepresentation *hostApi,
-+    PaStream **stream,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate,
-+    unsigned long framesPerBuffer,
-+    PaStreamFlags streamFlags,
-+    PaStreamCallback *streamCallback,
-+    void *userData)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	PaSndioStream *s;
-+	PaError err;
-+	struct sio_hdl *hdl;
-+	struct sio_par par;
-+	unsigned mode;
-+	int inch, onch;
-+	PaSampleFormat ifmt, ofmt, siofmt;
-+	const char *dev;
-+
-+	DPR("OpenStream:\n");
-+
-+	mode = 0;
-+	inch = onch = 0;
-+	ifmt = ofmt = 0;
-+	sio_initpar(&par);
-+
-+	if (outputPar && outputPar->channelCount > 0) {
-+		if (outputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad output device\n", outputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (outputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: output specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, outputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ofmt = outputPar->sampleFormat;
-+		onch = par.pchan = outputPar->channelCount;
-+		mode |= SIO_PLAY;
-+	}
-+	if (inputPar && inputPar->channelCount > 0) {
-+		if (inputPar->device >= sndioHostApi->base.info.deviceCount) {
-+			DPR("OpenStream: %d: bad input device\n", inputPar->device);
-+			return paInvalidDevice;
-+		}
-+		if (inputPar->hostApiSpecificStreamInfo) {
-+			DPR("OpenStream: input specific info\n");
-+			return paIncompatibleHostApiSpecificStreamInfo;
-+		}
-+		if (!sndioSetFmt(&par, inputPar->sampleFormat)) {
-+			return paSampleFormatNotSupported;
-+		}
-+		ifmt = inputPar->sampleFormat;
-+		inch = par.rchan = inputPar->channelCount;
-+		mode |= SIO_REC;
-+	}
-+	par.rate = sampleRate;
-+	if (framesPerBuffer != paFramesPerBufferUnspecified)
-+		par.round = framesPerBuffer;
-+
-+	DPR("OpenStream: mode = %x, trying rate = %u\n", mode, par.rate);
-+
-+	if (outputPar) {
-+		dev = sndioHostApi->device_info[outputPar->device].name;
-+	} else if (inputPar) {
-+		dev = sndioHostApi->device_info[inputPar->device].name;
-+	} else {
-+		return paUnanticipatedHostError;
-+	}
-+	hdl = sio_open(dev, mode, 0);
-+	if (hdl == NULL)
-+		return paUnanticipatedHostError;
-+	if (!sio_setpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sio_getpar(hdl, &par)) {
-+		sio_close(hdl);
-+		return paUnanticipatedHostError;
-+	}
-+	if (!sndioGetFmt(&par, &siofmt)) {
-+		sio_close(hdl);
-+		return paSampleFormatNotSupported;
-+	}
-+	if ((mode & SIO_REC) && par.rchan != inputPar->channelCount) {
-+		DPR("OpenStream: rchan(%u) != %d\n", par.rchan, inputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((mode & SIO_PLAY) && par.pchan != outputPar->channelCount) {
-+		DPR("OpenStream: pchan(%u) != %d\n", par.pchan, outputPar->channelCount);
-+		sio_close(hdl);
-+		return paInvalidChannelCount;
-+	}
-+	if ((double)par.rate < sampleRate * 0.995 ||
-+	    (double)par.rate > sampleRate * 1.005) {
-+		DPR("OpenStream: rate(%u) != %g\n", par.rate, sampleRate);
-+		sio_close(hdl);
-+		return paInvalidSampleRate;
-+	}
-+	
-+	s = (PaSndioStream *)PaUtil_AllocateMemory(sizeof(PaSndioStream));
-+	if (s == NULL) {
-+		sio_close(hdl);
-+		return paInsufficientMemory;
-+	}
-+	PaUtil_InitializeStreamRepresentation(&s->base, 
-+	    streamCallback ? &sndioHostApi->callback : &sndioHostApi->blocking,
-+	    streamCallback, userData);
-+	DPR("inch = %d, onch = %d, ifmt = %x, ofmt = %x\n", 
-+	    inch, onch, ifmt, ofmt);
-+	err = PaUtil_InitializeBufferProcessor(&s->bufproc,
-+	    inch, ifmt, siofmt,
-+	    onch, ofmt, siofmt,
-+	    sampleRate,
-+	    streamFlags,
-+	    framesPerBuffer,
-+	    par.round,
-+	    paUtilFixedHostBufferSize, 
-+	    streamCallback, userData);
-+	if (err) {
-+		DPR("OpenStream: PaUtil_InitializeBufferProcessor failed\n");
-+		PaUtil_FreeMemory(s);
-+		sio_close(hdl);
-+		return err;
-+	}
-+	if (mode & SIO_REC) {
-+		s->rbuf = malloc(par.round * par.rchan * par.bps);
-+		if (s->rbuf == NULL) {
-+			DPR("OpenStream: failed to allocate rbuf\n");
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}
-+	if (mode & SIO_PLAY) {
-+		s->wbuf = malloc(par.round * par.pchan * par.bps);
-+		if (s->wbuf == NULL) {
-+			DPR("OpenStream: failed to allocate wbuf\n");
-+			free(s->rbuf);
-+			PaUtil_FreeMemory(s);
-+			sio_close(hdl);
-+			return paInsufficientMemory;
-+		}
-+	}	
-+	s->base.streamInfo.inputLatency = 0;
-+	s->base.streamInfo.outputLatency = (mode & SIO_PLAY) ?
-+	    (double)(par.bufsz + PaUtil_GetBufferProcessorOutputLatencyFrames(&s->bufproc)) / (double)par.rate : 0;
-+	s->base.streamInfo.sampleRate = par.rate;
-+	s->active = 0;
-+	s->stopped = 1;
-+	s->mode = mode;
-+	s->hdl = hdl;
-+	s->par = par;
-+	*stream = s;	
-+	DPR("OpenStream: done\n");
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingReadStream(PaStream *stream, void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res, todo;
-+	void *buf;
-+	
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		buf = s->rbuf;
-+		todo = n * s->par.rchan * s->par.bps;
-+		while (todo > 0) {
-+			res = sio_read(s->hdl, buf, todo);
-+			if (res == 0)
-+				return paUnanticipatedHostError;
-+			buf = (char *)buf + res;
-+			todo -= res;
-+		}
-+		s->rpos += n;
-+		PaUtil_SetInputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedInputChannels(&s->bufproc, 0, s->rbuf, s->par.rchan);
-+		res = PaUtil_CopyInput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingReadStream: copyInput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+BlockingWriteStream(PaStream* stream, const void *data, unsigned long numFrames)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned n, res;
-+
-+	while (numFrames > 0) {
-+		n = s->par.round;
-+		if (n > numFrames)
-+			n = numFrames;
-+		PaUtil_SetOutputFrameCount(&s->bufproc, n);
-+		PaUtil_SetInterleavedOutputChannels(&s->bufproc, 0, s->wbuf, s->par.pchan);
-+		res = PaUtil_CopyOutput(&s->bufproc, &data, n);
-+		if (res != n) {
-+			DPR("BlockingWriteStream: copyOutput: %u != %u\n");
-+			return paUnanticipatedHostError;
-+		}
-+		res = sio_write(s->hdl, s->wbuf, n * s->par.pchan * s->par.bps);
-+		if (res == 0)
-+			return paUnanticipatedHostError;		
-+		s->wpos += n;
-+		numFrames -= n;
-+	}
-+	return paNoError;
-+}
-+
-+static signed long
-+BlockingGetStreamReadAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLIN);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLIN))
-+		return 0;
-+
-+	return s->realpos - s->rpos;
-+}
-+
-+static signed long
-+BlockingGetStreamWriteAvailable(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	struct pollfd pfd;
-+	int n, events;
-+
-+	n = sio_pollfd(s->hdl, &pfd, POLLOUT);
-+	while (poll(&pfd, n, 0) < 0) {
-+		if (errno == EINTR)
-+			continue;
-+		perror("poll");
-+		abort();
-+	}
-+	events = sio_revents(s->hdl, &pfd);
-+	if (!(events & POLLOUT))
-+		return 0;
-+
-+	return s->par.bufsz - (s->wpos - s->realpos);
-+}
-+
-+static PaError
-+BlockingWaitEmpty( PaStream *stream )
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	/*
-+	 * drain playback buffers; sndio always does it in background
-+	 * and there is no way to wait for completion
-+	 */
-+	DPR("BlockingWaitEmpty: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return paNoError;
-+}
-+
-+static PaError
-+StartStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	unsigned primes, wblksz;
-+	int err;
-+
-+	DPR("StartStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (!s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 0;
-+	s->active = 1;
-+	s->realpos = 0;
-+	s->wpos = 0;
-+	s->rpos = 0;
-+	PaUtil_ResetBufferProcessor(&s->bufproc);
-+	if (!sio_start(s->hdl))
-+		return paUnanticipatedHostError;
-+
-+	/*
-+	 * send a complete buffer of silence
-+	 */
-+	if (s->mode & SIO_PLAY) {
-+		wblksz = s->par.round * s->par.pchan * s->par.bps;
-+		memset(s->wbuf, 0, wblksz);
-+		for (primes = s->par.bufsz / s->par.round; primes > 0; primes--)
-+			s->wpos += sio_write(s->hdl, s->wbuf, wblksz);
-+	}
-+	if (s->base.streamCallback) {
-+		err = pthread_create(&s->thread, NULL, sndioThread, s);
-+		if (err) {
-+			DPR("SndioStartStream: couldn't create thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+		DPR("StartStream: started...\n");
-+	}
-+	return paNoError;
-+}
-+
-+static PaError
-+StopStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+	void *ret;
-+	int err;
-+
-+	DPR("StopStream: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	if (s->stopped) {
-+		DPR("StartStream: already started\n");
-+		return paNoError;
-+	}
-+	s->stopped = 1;
-+	if (s->base.streamCallback) {
-+		err = pthread_join(s->thread, &ret);
-+		if (err) {
-+			DPR("SndioStop: couldn't join thread\n");
-+			return paUnanticipatedHostError;
-+		}
-+	}
-+	if (!sio_stop(s->hdl))
-+		return paUnanticipatedHostError;
-+	return paNoError;
-+}
-+
-+static PaError
-+CloseStream(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	DPR("CloseStream:\n");
-+
-+	if (!s->stopped)
-+		StopStream(stream);
-+
-+	if (s->mode & SIO_REC)
-+		free(s->rbuf);
-+	if (s->mode & SIO_PLAY)
-+		free(s->wbuf);
-+	sio_close(s->hdl);
-+        PaUtil_TerminateStreamRepresentation(&s->base);
-+	PaUtil_TerminateBufferProcessor(&s->bufproc);
-+	PaUtil_FreeMemory(s);
-+	return paNoError;
-+}
-+
-+static PaError
-+AbortStream(PaStream *stream)
-+{
-+	DPR("AbortStream:\n");
-+
-+	return StopStream(stream);
-+}
-+
-+static PaError
-+IsStreamStopped(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamStopped: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->stopped;
-+}
-+
-+static PaError
-+IsStreamActive(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	//DPR("IsStreamActive: s=%d, a=%d\n", s->stopped, s->active);
-+
-+	return s->active;
-+}
-+
-+static PaTime
-+GetStreamTime(PaStream *stream)
-+{
-+	PaSndioStream *s = (PaSndioStream *)stream;
-+
-+	return (double)s->realpos / s->base.streamInfo.sampleRate;
-+}
-+
-+static PaError
-+IsFormatSupported(struct PaUtilHostApiRepresentation *hostApi,
-+    const PaStreamParameters *inputPar,
-+    const PaStreamParameters *outputPar,
-+    double sampleRate)
-+{
-+	return paFormatIsSupported;
-+}
-+
-+static void
-+Terminate(struct PaUtilHostApiRepresentation *hostApi)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	sndioHostApi = (PaSndioHostApiRepresentation *)hostApi;
-+	free(sndioHostApi->audiodevices);
-+	PaUtil_FreeMemory(hostApi);
-+}
-+
-+static void
-+InitDeviceInfo(PaDeviceInfo *info, PaHostApiIndex hostApiIndex, const char *name)
-+{
-+	info->structVersion = 2;
-+	info->name = name;
-+	info->hostApi = hostApiIndex;
-+	info->maxInputChannels = 128;
-+	info->maxOutputChannels = 128;
-+	info->defaultLowInputLatency = 0.01;
-+	info->defaultLowOutputLatency = 0.01;
-+	info->defaultHighInputLatency = 0.5;
-+	info->defaultHighOutputLatency = 0.5;
-+	info->defaultSampleRate = 48000;
-+}
-+
-+PaError
-+PaSndio_Initialize(PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex)
-+{
-+	PaSndioHostApiRepresentation *sndioHostApi;
-+	PaDeviceInfo *info;
-+	struct sio_hdl *hdl;
-+	char *audiodevices;
-+	char *device;
-+	size_t deviceCount;
-+
-+	DPR("PaSndio_Initialize: initializing...\n");
-+
-+	if ((hdl=sio_open(SIO_DEVANY, SIO_PLAY, 1)) == NULL)
-+		return paNoError;
-+	sio_close(hdl);
-+	/* unusable APIs should return paNoError and a NULL hostApi */
-+	*hostApi = NULL;
-+
-+	sndioHostApi = PaUtil_AllocateMemory(sizeof(PaSndioHostApiRepresentation));
-+	if (sndioHostApi == NULL)
-+		return paNoError;
-+
-+	// Add default device
-+	info = &sndioHostApi->device_info[0];
-+	InitDeviceInfo(info, hostApiIndex, SIO_DEVANY);
-+	sndioHostApi->infos[0] = info;
-+	deviceCount = 1;
-+
-+	// Add additional devices as specified in the PA_SNDIO_AUDIODEVICES
-+	// environment variable as a colon separated list
-+	sndioHostApi->audiodevices = NULL;
-+	audiodevices = getenv("PA_SNDIO_AUDIODEVICES");
-+	if (audiodevices != NULL) {
-+		sndioHostApi->audiodevices = strdup(audiodevices);
-+		if (sndioHostApi->audiodevices == NULL)
-+			return paNoError;
-+
-+		audiodevices = sndioHostApi->audiodevices;
-+		while ((device = strsep(&audiodevices, ":")) != NULL &&
-+			deviceCount < PA_SNDIO_AUDIODEVICES_MAX) {
-+			if (*device == '\0')
-+				continue;
-+			info = &sndioHostApi->device_info[deviceCount];
-+			InitDeviceInfo(info, hostApiIndex, device);
-+			sndioHostApi->infos[deviceCount] = info;
-+			deviceCount++;
-+		}
-+	}
-+
-+	*hostApi = &sndioHostApi->base;
-+	(*hostApi)->info.structVersion = 1;
-+	(*hostApi)->info.type = paSndio;
-+	(*hostApi)->info.name = "sndio";
-+	(*hostApi)->info.deviceCount = deviceCount;
-+	(*hostApi)->info.defaultInputDevice = 0;
-+	(*hostApi)->info.defaultOutputDevice = 0;
-+	(*hostApi)->deviceInfos = sndioHostApi->infos;
-+	(*hostApi)->Terminate = Terminate;
-+	(*hostApi)->OpenStream = OpenStream;
-+	(*hostApi)->IsFormatSupported = IsFormatSupported;
-+	
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->blocking,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    BlockingReadStream,
-+	    BlockingWriteStream,
-+	    BlockingGetStreamReadAvailable,
-+	    BlockingGetStreamWriteAvailable);
-+
-+	PaUtil_InitializeStreamInterface(&sndioHostApi->callback,
-+	    CloseStream,
-+	    StartStream,
-+	    StopStream,
-+	    AbortStream,
-+	    IsStreamStopped,
-+	    IsStreamActive,
-+	    GetStreamTime,
-+	    PaUtil_DummyGetCpuLoad,
-+	    PaUtil_DummyRead,
-+	    PaUtil_DummyWrite,
-+	    PaUtil_DummyGetReadAvailable,
-+	    PaUtil_DummyGetWriteAvailable);
-+
-+	DPR("PaSndio_Initialize: done\n");
-+	return paNoError;
-+}
-diff --git a/src/os/unix/pa_unix_hostapis.c b/src/os/unix/pa_unix_hostapis.c
-index a9b4a05..f10ced1 100644
---- a/src/os/unix/pa_unix_hostapis.c
-+++ b/src/os/unix/pa_unix_hostapis.c
-@@ -44,6 +44,7 @@
- 
- PaError PaJack_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaAlsa_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-+PaError PaSndio_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
- /* Added for IRIX, Pieter, oct 2, 2003: */
- PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-@@ -57,6 +58,10 @@ PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiI
- 
- PaUtilHostApiInitializer *paHostApiInitializers[] =
-     {
-+#ifdef PA_USE_SNDIO
-+	    PaSndio_Initialize,
-+#endif
-+
- #ifdef __linux__
- 
- #if PA_USE_ALSA
--- 
-2.27.0
-
diff --git a/srcpkgs/portaudio/template b/srcpkgs/portaudio/template
index 54dcd9a7215504..29bb0c53622c93 100644
--- a/srcpkgs/portaudio/template
+++ b/srcpkgs/portaudio/template
@@ -1,7 +1,7 @@
 # Template file for 'portaudio'
 pkgname=portaudio
-version=190600.20161030
-revision=6
+version=190700.20210406
+revision=1
 build_style=gnu-configure
 configure_args="--enable-cxx --with-jack $(vopt_enable sndio)"
 hostmakedepends="pkg-config"
@@ -9,14 +9,12 @@ makedepends="alsa-lib-devel jack-devel $(vopt_if sndio sndio-devel)"
 short_desc="Portable cross-platform audio I/O library"
 maintainer="Érico Nogueira <ericonr@disroot.org>"
 license="MIT"
-homepage="http://www.portaudio.com"
-distfiles="http://www.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
-checksum=f5a21d7dcd6ee84397446fa1fa1a0675bb2e8a4a6dceb4305a8404698d8d1513
+homepage="https://www.portaudio.com"
+distfiles="https://files.${pkgname}.com/archives/pa_stable_v${version%.*}_${version#*.}.tgz"
+checksum=47efbf42c77c19a05d22e627d42873e991ec0c1357219c0d74ce6a2948cb2def
 disable_parallel_build=yes
 
-# sndio disabled by default: non-upstream patch
 build_options="sndio"
-build_options_default=""
 
 post_install() {
 	vlicense LICENSE.txt

From a03eeffb78ed3f8b9cc6e56f530f7a069319de5b Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:27 +0600
Subject: [PATCH 4/6] sqlite: update to 3.45.3.

---
 srcpkgs/sqlite/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/sqlite/template b/srcpkgs/sqlite/template
index 1d548eb479560b..4ae8fd4d281465 100644
--- a/srcpkgs/sqlite/template
+++ b/srcpkgs/sqlite/template
@@ -1,6 +1,6 @@
 # Template file for 'sqlite'
 pkgname=sqlite
-version=3.45.2
+version=3.45.3
 revision=1
 _amalgamationver=$(printf "%d%02d%02d00\n" ${version//./ })
 build_style=gnu-configure
@@ -12,7 +12,7 @@ license="Public Domain"
 homepage="https://sqlite.org/"
 changelog="https://www.sqlite.org/changes.html"
 distfiles="https://sqlite.org/2024/sqlite-autoconf-${_amalgamationver}.tar.gz"
-checksum=bc9067442eedf3dd39989b5c5cfbfff37ae66cc9c99274e0c3052dc4d4a8f6ae
+checksum=b2809ca53124c19c60f42bf627736eae011afdcc205bb48270a5ee9a38191531
 
 CFLAGS="-DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_COLUMN_METADATA \
  -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_SECURE_DELETE \

From c97e10e9cb9989fac6ccfb6882680f5be0c6820c Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:32 +0600
Subject: [PATCH 5/6] suil: update to 0.10.20.

---
 srcpkgs/suil/template | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/srcpkgs/suil/template b/srcpkgs/suil/template
index 680e1972cd4371..58d7d4aceee052 100644
--- a/srcpkgs/suil/template
+++ b/srcpkgs/suil/template
@@ -1,8 +1,8 @@
 # Template file for 'suil'
 pkgname=suil
-version=0.10.12
+version=0.10.20
 revision=1
-build_style=waf3
+build_style=meson
 hostmakedepends="pkg-config lv2"
 makedepends="gtk+-devel qt5-devel gtk+3-devel"
 short_desc="Lightweight C library for loading and wrapping LV2 plugin UIs"
@@ -10,8 +10,8 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="MIT"
 homepage="https://drobilla.net/software/suil.html"
 changelog="https://gitlab.com/lv2/suil/-/raw/master/NEWS"
-distfiles="http://download.drobilla.net/${pkgname}-${version}.tar.bz2"
-checksum=daa763b231b22a1f532530d3e04c1fae48d1e1e03785e23c9ac138f207b87ecd
+distfiles="https://download.drobilla.net/suil-${version}.tar.xz"
+checksum=334a3ed3e73d5e17ff400b3db9801f63809155b0faa8b1b9046f9dd3ffef934e
 
 if [ "$CROSS_BUILD" ]; then
 	hostmakedepends+=" qt5-host-tools qt5-devel"

From 5658b7094da77a72728972f32a3b4e7495a34309 Mon Sep 17 00:00:00 2001
From: IFoundSilentHouse <adeptslab@gmail.com>
Date: Fri, 26 Apr 2024 23:18:39 +0600
Subject: [PATCH 6/6] wavpack: update to 5.7.0.

---
 srcpkgs/wavpack/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/wavpack/template b/srcpkgs/wavpack/template
index d9b0f68f014bda..c6c65770f0d7fc 100644
--- a/srcpkgs/wavpack/template
+++ b/srcpkgs/wavpack/template
@@ -1,6 +1,6 @@
 # Template file for 'wavpack'
 pkgname=wavpack
-version=5.6.0
+version=5.7.0
 revision=1
 build_style=gnu-configure
 configure_args="--enable-static"
@@ -10,7 +10,7 @@ license="BSD-3-Clause"
 homepage="https://www.wavpack.com/"
 changelog="https://raw.githubusercontent.com/dbry/WavPack/master/NEWS"
 distfiles="https://www.wavpack.com/wavpack-${version}.tar.bz2"
-checksum=8cbfa15927d29bcf953db35c0cfca7424344ff43ebe4083daf161577fb839cc1
+checksum=8944b237968a1b3976a1eb47cd556916e041a2aa8917495db65f82c3fcc2a225
 
 case "$XBPS_TARGET_MACHINE" in
 	armv5*) configure_args+=" --disable-asm";;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-04-26 23:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26 17:50 [PR PATCH] audacity: update to 3.5.1. Update audacity and deps iFoundSilentHouse
2024-04-26 18:08 ` [PR PATCH] [Updated] [WIP] " iFoundSilentHouse
2024-04-26 18:12 ` iFoundSilentHouse
2024-04-26 19:17 ` iFoundSilentHouse
2024-04-26 22:14 ` iFoundSilentHouse
2024-04-26 22:16 ` iFoundSilentHouse
2024-04-26 23:13 ` [PR PATCH] [Updated] " iFoundSilentHouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).