From: ericonr <ericonr@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] Use sndio as first preference in PortAudio, enable PortAudio for spotifyd
Date: Sun, 26 Jul 2020 04:18:25 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23838@inbox.vuxu.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 754 bytes --]
There is a new pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages sndio
https://github.com/void-linux/void-packages/pull/23838
Use sndio as first preference in PortAudio, enable PortAudio for spotifyd
If sndio isn't available, spotifyd, using the portaudio backend, falls back to ALSA cleanly. However, in the previous version, with sndio enabled, the portaudio backend simply didn't output anything. Therefore, I believe my change to the patch makes sense.
Enabling portaudio for spotifyd makes sense because it allows one to use sndio without requiring alsa-sndio.
@Johnnynator and @abenson
A patch file from https://github.com/void-linux/void-packages/pull/23838.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-sndio-23838.patch --]
[-- Type: text/x-diff, Size: 5520 bytes --]
From 7202e94a530e07dfe0c7e6989e8e40e348da556e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 25 Jul 2020 22:50:30 -0300
Subject: [PATCH 1/2] portaudio: try sndio as first audio device, adopt.
It falls back gracefully into the backends other than sndio, but
otherwise might not work with sndio even if a sndio device is available.
This commit fixes that behavior.
---
srcpkgs/portaudio/patches/sndio.patch | 23 +++++++++++++----------
srcpkgs/portaudio/template | 4 ++--
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/srcpkgs/portaudio/patches/sndio.patch b/srcpkgs/portaudio/patches/sndio.patch
index 764916496e5..3ab0a9e4c5e 100644
--- a/srcpkgs/portaudio/patches/sndio.patch
+++ b/srcpkgs/portaudio/patches/sndio.patch
@@ -20,7 +20,7 @@ index 5e1a764..2747f73 100644
src/hostapi/wdmks \
src/hostapi/wmme \
diff --git configure.in configure.in
-index 13816fb..4c06d10 100644
+index 83c239a..db11d65 100644
--- configure.in
+++ configure.in
@@ -24,6 +24,10 @@ AC_ARG_WITH(alsa,
@@ -59,7 +59,7 @@ index 13816fb..4c06d10 100644
if [[ "$have_jack" = "yes" ] && [ "$with_jack" != "no" ]] ; then
DLL_LIBS="$DLL_LIBS $JACK_LIBS"
CFLAGS="$CFLAGS $JACK_CFLAGS"
-@@ -509,6 +524,7 @@ case "$target_os" in
+@@ -510,6 +525,7 @@ case "$target_os" in
;;
*)
AC_MSG_RESULT([
@@ -68,7 +68,7 @@ index 13816fb..4c06d10 100644
JACK ........................ $have_jack
])
diff --git include/portaudio.h include/portaudio.h
-index 8a94aaf..f94d9c4 100644
+index 9c8a295..e535a02 100644
--- include/portaudio.h
+++ include/portaudio.h
@@ -287,7 +287,8 @@ typedef enum PaHostApiTypeId
@@ -853,7 +853,7 @@ index 0000000..725ef47
+ return paNoError;
+}
diff --git src/os/unix/pa_unix_hostapis.c src/os/unix/pa_unix_hostapis.c
-index a9b4a05..c3fa2a3 100644
+index a9b4a05..f10ced1 100644
--- src/os/unix/pa_unix_hostapis.c
+++ src/os/unix/pa_unix_hostapis.c
@@ -44,6 +44,7 @@
@@ -864,14 +864,17 @@ index a9b4a05..c3fa2a3 100644
PaError PaOSS_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
/* Added for IRIX, Pieter, oct 2, 2003: */
PaError PaSGI_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index );
-@@ -79,6 +80,10 @@ PaUtilHostApiInitializer *paHostApiInitializers[] =
-
- #endif /* __linux__ */
+@@ -57,6 +58,10 @@ PaError PaSkeleton_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiI
+ PaUtilHostApiInitializer *paHostApiInitializers[] =
+ {
+#ifdef PA_USE_SNDIO
+ PaSndio_Initialize,
+#endif
+
- #if PA_USE_JACK
- PaJack_Initialize,
- #endif
+ #ifdef __linux__
+
+ #if PA_USE_ALSA
+--
+2.27.0
+
diff --git a/srcpkgs/portaudio/template b/srcpkgs/portaudio/template
index f53a2be340a..572be816257 100644
--- a/srcpkgs/portaudio/template
+++ b/srcpkgs/portaudio/template
@@ -1,14 +1,14 @@
# Template file for 'portaudio'
pkgname=portaudio
version=190600.20161030
-revision=4
+revision=5
wrksrc=portaudio
build_style=gnu-configure
configure_args="--enable-cxx --with-jack $(vopt_enable sndio)"
hostmakedepends="automake libtool pkg-config"
makedepends="alsa-lib-devel jack-devel $(vopt_if sndio sndio-devel)"
short_desc="Portable cross-platform audio I/O library"
-maintainer="Orphaned <orphan@voidlinux.org>"
+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"
From 5f06da8cc3e9ed32f216162f932dba78e74279e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Sat, 25 Jul 2020 22:55:31 -0300
Subject: [PATCH 2/2] spotifyd: add portaudio build option.
This option is on by default.
---
srcpkgs/spotifyd/template | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/srcpkgs/spotifyd/template b/srcpkgs/spotifyd/template
index 3d9c98f51cd..00b16675698 100644
--- a/srcpkgs/spotifyd/template
+++ b/srcpkgs/spotifyd/template
@@ -1,12 +1,13 @@
# Template file for 'spotifyd'
pkgname=spotifyd
version=0.2.24
-revision=3
+revision=4
build_style=cargo
configure_args="--no-default-features"
hostmakedepends="pkg-config"
makedepends="libressl-devel $(vopt_if alsa alsa-lib-devel)
-$(vopt_if pulseaudio pulseaudio-devel) $(vopt_if dbus dbus-devel)"
+ $(vopt_if pulseaudio pulseaudio-devel) $(vopt_if portaudio portaudio-devel)
+ $(vopt_if dbus dbus-devel)"
short_desc="Spotify client running as a UNIX daemon"
maintainer="Andrew Benson <abenson+void@gmail.com>"
license="GPL-3.0-or-later"
@@ -14,8 +15,9 @@ homepage="https://github.com/Spotifyd/spotifyd"
distfiles="${homepage}/archive/v${version}.tar.gz"
checksum=d3763f4647217a8f98ee938b50e141d67a5f3d33e9378894fde2a92c9845ef80
-build_options="alsa pulseaudio dbus"
-build_options_default="alsa pulseaudio dbus"
+build_options="alsa pulseaudio portaudio dbus"
+desc_option_portaudio="Enable PortAudio backend"
+build_options_default="alsa pulseaudio portaudio dbus"
export CFLAGS_${RUST_BUILD//-/_}="${CFLAGS_host}"
export CC_${RUST_BUILD//-/_}="${BUILD_CC}"
@@ -23,6 +25,7 @@ export CC_${RUST_BUILD//-/_}="${BUILD_CC}"
_features="$(vopt_if alsa ',alsa_backend')"
_features+="$(vopt_if pulseaudio ',pulseaudio_backend')"
_features+="$(vopt_if dbus ',dbus_mpris,dbus_keyring')"
+_features+="$(vopt_if portaudio ',portaudio_backend')"
if [ "$_features" ]; then
configure_args+=" --features $_features"
next reply other threads:[~2020-07-26 2:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-26 2:18 ericonr [this message]
2020-07-26 12:56 ` Johnnynator
2020-07-26 17:57 ` ericonr
2020-07-26 21:21 ` [PR PATCH] [Updated] " ericonr
2020-07-28 9:41 ` [PR PATCH] [Merged]: " Johnnynator
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-23838@inbox.vuxu.org \
--to=ericonr@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).