summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2019-11-30 13:40:29 +0000
committernia <nia@pkgsrc.org>2019-11-30 13:40:29 +0000
commitb7795e36e0b7841f7b612dfaf77091e4a8ada977 (patch)
tree61581d1055af8c3075a5e678c7b1579d2062c118 /audio
parente98bcd03a20c325ffbbb843e8fb7e542f2bebd3a (diff)
downloadpkgsrc-b7795e36e0b7841f7b612dfaf77091e4a8ada977.tar.gz
openal-soft: Update to 1.20.0
pkgsrc changes: - Support more audio backends. openal-soft-1.20.0: Converted the library codebase to C++11. A lot of hacks and custom structures have been replaced with standard or cleaner implementations. Partially implemented the Vocal Morpher effect. Fixed the bsinc SSE resamplers on non-GCC compilers. Fixed OpenSL capture. Fixed support for extended capture formats with OpenSL. Fixed handling of WASAPI not reporting a default device. Fixed performance problems relating to semaphores on macOS. Modified the bsinc12 resampler's transition band to better avoid aliasing noise. Modified alcResetDeviceSOFT to attempt recovery of disconnected devices. Modified the virtual speaker layout for HRTF B-Format decoding. Modified the PulseAudio backend to use a custom processing loop. Renamed the makehrtf utility to makemhr. Improved the efficiency of the bsinc resamplers when up-sampling. Improved the quality of the bsinc resamplers slightly. Improved the efficiency of the HRTF filters. Improved the HRTF B-Format decoder coefficient generation. Improved reverb feedback fading to be more consistent with pan fading. Improved handling of sources that end prematurely, avoiding loud clicks. Improved the performance of some reverb processing loops. Added fast_bsinc12 and 24 resamplers that improve efficiency at the cost of some quality. Notably, down-sampling has less smooth pitch ramping. Added support for SOFA input files with makemhr. Added a build option to use pre-built native tools. For cross-compiling, use with caution and ensure the native tools' binaries are kept up-to-date. Added an adjust-latency config option for the PulseAudio backend. Added basic support for multi-field HRTFs. Added an option for mixing first- or second-order B-Format with HRTF output. This can improve HRTF performance given a number of sources. Added an RC file for proper DLL version information. Disabled some old KDE workarounds by default. Specifically, PulseAudio streams can now be moved (KDE may try to move them after opening).
Diffstat (limited to 'audio')
-rw-r--r--audio/openal-soft/Makefile62
-rw-r--r--audio/openal-soft/PLIST4
-rw-r--r--audio/openal-soft/distinfo13
-rw-r--r--audio/openal-soft/options.mk28
-rw-r--r--audio/openal-soft/patches/patch-Alc_alconfig.c15
-rw-r--r--audio/openal-soft/patches/patch-alc_alconfig.cpp15
-rw-r--r--audio/openal-soft/patches/patch-alc_backends_alsa.cpp16
7 files changed, 97 insertions, 56 deletions
diff --git a/audio/openal-soft/Makefile b/audio/openal-soft/Makefile
index 8b5524283d9..b77a6f03aff 100644
--- a/audio/openal-soft/Makefile
+++ b/audio/openal-soft/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.11 2019/11/02 21:09:15 rillig Exp $
+# $NetBSD: Makefile,v 1.12 2019/11/30 13:40:29 nia Exp $
-DISTNAME= openal-soft-1.19.1
+DISTNAME= openal-soft-1.20.0
CATEGORIES= audio
MASTER_SITES= https://kcat.strangesoft.net/openal-releases/
EXTRACT_SUFX= .tar.bz2
@@ -11,51 +11,47 @@ COMMENT= Software implementation of the OpenAL 3D audio API
LICENSE= gnu-lgpl-v2
USE_CMAKE= yes
-USE_LANGUAGES= c c++
+USE_LANGUAGES= c c++11
USE_TOOLS+= pkg-config
+# C++11
+GCC_REQD+= 4.7
+
PKG_SYSCONFSUBDIR= openal
+CMAKE_ARGS+= -DALSOFT_EXAMPLES=OFF
+CMAKE_ARGS+= -DALSOFT_NO_CONFIG_UTIL=ON
+
+CFLAGS+= -DSYS_CONF_DIR="\"${PKG_SYSCONFDIR}\""
+CFLAGS.NetBSD+= -D_NETBSD_SOURCE
+CFLAGS.SunOS+= -D__EXTENSIONS__
+
+CONF_FILES+= ${PREFIX}/share/openal/alsoftrc.sample ${PKG_SYSCONFDIR}/alsoft.conf
+
.include "../../mk/bsd.prefs.mk"
-.if ${OPSYS} != "Linux"
-CMAKE_ARGS+= -DALSOFT_BACKEND_ALSA:BOOL=OFF
-.else
-.include "../../audio/alsa-lib/buildlink3.mk"
+.if ${OPSYS} == "SunOS" || ${OPSYS} == "NetBSD"
+CMAKE_ARGS+= -DALSOFT_BACKEND_SOLARIS=ON
+CMAKE_ARGS+= -DALSOFT_REQUIRE_SOLARIS=ON
.endif
-CMAKE_ARGS+= -DALSOFT_REQUIRE_SOLARIS:BOOL=OFF
-CMAKE_ARGS+= -DALSOFT_REQUIRE_SNDIO:BOOL=OFF
-CMAKE_ARGS+= -DALSOFT_REQUIRE_QSA:BOOL=OFF
-CMAKE_ARGS+= -DALSOFT_BACKEND_WAVE:BOOL=ON
-CMAKE_ARGS+= -DALSOFT_UTILS:BOOL=ON
-CMAKE_ARGS+= -DALSOFT_EXAMPLES:BOOL=OFF
-CMAKE_ARGS+= -DALSOFT_BACKEND_JACK:BOOL=OFF
-CMAKE_ARGS+= -DALSOFT_BACKEND_PORTAUDIO:BOOL=OFF
-CMAKE_ARGS+= -DALSOFT_BACKEND_PULSEAUDIO:BOOL=OFF
-CMAKE_ARGS+= -DALSOFT_NO_CONFIG_UTIL:BOOL=ON
-
.include "../../mk/oss.buildlink3.mk"
-.if ${OSS_TYPE} == "none"
-CMAKE_ARGS+= -DALSOFT_REQUIRE_OSS:BOOL=OFF
-.else
-CMAKE_ARGS+= -DALSOFT_REQUIRE_OSS:BOOL=ON
+.if ${OSS_TYPE} != "none"
+CMAKE_ARGS+= -DALSOFT_BACKEND_OSS=ON
+CMAKE_ARGS+= -DALSOFT_REQUIRE_OSS=ON
+SUBST_CLASSES+= oss
+SUBST_STAGE.oss= pre-configure
+SUBST_MESSAGE.oss= Fixing default OSS device references.
+SUBST_FILES.oss= alc/backends/oss.cpp
+SUBST_SED.oss= -e 's,/dev/dsp,${DEVOSSAUDIO},'
.endif
-CFLAGS+= -DSYS_CONF_DIR="\"${PKG_SYSCONFDIR}\""
-CFLAGS.NetBSD+= -D_NETBSD_SOURCE
-CFLAGS.SunOS+= -D__EXTENSIONS__
-CONF_FILES+= ${PREFIX}/share/openal/alsoftrc.sample ${PKG_SYSCONFDIR}/alsoft.conf
-
-SUBST_CLASSES+= fix-oss
-SUBST_STAGE.fix-oss= pre-configure
-SUBST_MESSAGE.fix-oss= Fixing default OSS device references.
-SUBST_FILES.fix-oss= Alc/backends/oss.c
-SUBST_SED.fix-oss= -e 's,/dev/dsp,${DEVOSSSOUND},'
+PKGCONFIG_OVERRIDE+= openal.pc.in
+.include "options.mk"
+.include "../../audio/libmysofa/buildlink3.mk"
.include "../../mk/dlopen.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
-
.include "../../mk/bsd.pkg.mk"
diff --git a/audio/openal-soft/PLIST b/audio/openal-soft/PLIST
index 247cfd71665..651a54135fa 100644
--- a/audio/openal-soft/PLIST
+++ b/audio/openal-soft/PLIST
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.3 2019/03/25 14:20:37 wiz Exp $
+@comment $NetBSD: PLIST,v 1.4 2019/11/30 13:40:29 nia Exp $
bin/altonegen
-bin/makehrtf
+bin/makemhr
bin/openal-info
include/AL/al.h
include/AL/alc.h
diff --git a/audio/openal-soft/distinfo b/audio/openal-soft/distinfo
index ce987362d75..7a9d893def0 100644
--- a/audio/openal-soft/distinfo
+++ b/audio/openal-soft/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.4 2019/03/25 14:20:37 wiz Exp $
+$NetBSD: distinfo,v 1.5 2019/11/30 13:40:29 nia Exp $
-SHA1 (openal-soft-1.19.1.tar.bz2) = 849db47ec3711f0181c4462b2d204c4a3d5937d2
-RMD160 (openal-soft-1.19.1.tar.bz2) = 321998692c62088edad653806a7dd3b368bce9e7
-SHA512 (openal-soft-1.19.1.tar.bz2) = 356a3f12bbe284bfac71f4f2a9f83d084083a832012222e73743042ac27812cf051c12b0ddcf53c010ff77e44ae2e9033cea9b9324d316a22a59a154307a64a4
-Size (openal-soft-1.19.1.tar.bz2) = 577310 bytes
-SHA1 (patch-Alc_alconfig.c) = 7628484191f11050b8037757fa3e3ed51cebfc90
+SHA1 (openal-soft-1.20.0.tar.bz2) = 7fade24f33d8dc7cdb1ea436aaf1f8d70afe1f9b
+RMD160 (openal-soft-1.20.0.tar.bz2) = 253119892e7854621db07b4200e35643c4ec3651
+SHA512 (openal-soft-1.20.0.tar.bz2) = 7b103ffeeb8a6541d4bd31245ca5e34fec27d121fe04c21655480fb3907604f4171f912411f1e49622ec27db79d6cb85eb452ed78523abc906f18af57ffb755e
+Size (openal-soft-1.20.0.tar.bz2) = 587550 bytes
+SHA1 (patch-alc_alconfig.cpp) = 0539016dadf1827e5a86700c2db5a96479a8b70d
+SHA1 (patch-alc_backends_alsa.cpp) = 3ee7f86e544d9b33ccbe9422eb87b9540623053a
diff --git a/audio/openal-soft/options.mk b/audio/openal-soft/options.mk
new file mode 100644
index 00000000000..129cc4ec69d
--- /dev/null
+++ b/audio/openal-soft/options.mk
@@ -0,0 +1,28 @@
+# $NetBSD: options.mk,v 1.1 2019/11/30 13:40:29 nia Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.openal-soft
+PKG_SUPPORTED_OPTIONS= alsa jack pulseaudio
+PKG_SUGGESTED_OPTIONS.Linux+= alsa
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Malsa)
+CMAKE_ARGS+= -DALSOFT_BACKEND_ALSA=ON
+. include "../../audio/alsa-lib/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DALSOFT_BACKEND_ALSA=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mjack)
+CMAKE_ARGS+= -DALSOFT_BACKEND_JACK=ON
+. include "../../audio/jack/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DALSOFT_BACKEND_JACK=OFF
+.endif
+
+.if !empty(PKG_OPTIONS:Mpulseaudio)
+CMAKE_ARGS+= -DALSOFT_BACKEND_PULSEAUDIO=ON
+. include "../../audio/pulseaudio/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DALSOFT_BACKEND_PULSEAUDIO=OFF
+.endif
diff --git a/audio/openal-soft/patches/patch-Alc_alconfig.c b/audio/openal-soft/patches/patch-Alc_alconfig.c
deleted file mode 100644
index 1430d709b96..00000000000
--- a/audio/openal-soft/patches/patch-Alc_alconfig.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-Alc_alconfig.c,v 1.1 2019/03/25 14:20:37 wiz Exp $
-
-Allow the Makefile to specify the default config file path.
-
---- Alc/alconfig.c.orig 2018-10-11 22:05:31.000000000 +0000
-+++ Alc/alconfig.c
-@@ -428,7 +428,7 @@ void ReadALConfig(void)
- const char *str;
- FILE *f;
-
-- str = "/etc/openal/alsoft.conf";
-+ str = SYS_CONF_DIR "/alsoft.conf";
-
- TRACE("Loading config %s...\n", str);
- f = al_fopen(str, "r");
diff --git a/audio/openal-soft/patches/patch-alc_alconfig.cpp b/audio/openal-soft/patches/patch-alc_alconfig.cpp
new file mode 100644
index 00000000000..9af82002c1b
--- /dev/null
+++ b/audio/openal-soft/patches/patch-alc_alconfig.cpp
@@ -0,0 +1,15 @@
+$NetBSD: patch-alc_alconfig.cpp,v 1.1 2019/11/30 13:40:29 nia Exp $
+
+Allow the Makefile to specify the default config file path.
+
+--- alc/alconfig.cpp.orig 2019-11-28 08:45:08.000000000 +0000
++++ alc/alconfig.cpp
+@@ -325,7 +325,7 @@ void ReadALConfig()
+
+ void ReadALConfig()
+ {
+- const char *str{"/etc/openal/alsoft.conf"};
++ const char *str{SYS_CONF_DIR "/alsoft.conf"};
+
+ TRACE("Loading config %s...\n", str);
+ al::ifstream f{str};
diff --git a/audio/openal-soft/patches/patch-alc_backends_alsa.cpp b/audio/openal-soft/patches/patch-alc_backends_alsa.cpp
new file mode 100644
index 00000000000..bd227a1ae2c
--- /dev/null
+++ b/audio/openal-soft/patches/patch-alc_backends_alsa.cpp
@@ -0,0 +1,16 @@
+$NetBSD: patch-alc_backends_alsa.cpp,v 1.1 2019/11/30 13:40:29 nia Exp $
+
+Support building on non-Linux.
+
+--- alc/backends/alsa.cpp.orig 2019-11-28 08:45:08.000000000 +0000
++++ alc/backends/alsa.cpp
+@@ -53,6 +53,9 @@
+
+ #include <alsa/asoundlib.h>
+
++#ifndef ESTRPIPE
++#define ESTRPIPE EPIPE
++#endif
+
+ namespace {
+