public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/vlc] epel10: Re-enable spatialaudio
@ 2026-09-23 14:55 Yaakov Selkowitz
0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 2026-09-23 14:55 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/vlc
Branch : epel10
Commit : ded7dd48e938bb8d676e183307a7ef5689434b6a
Author : Yaakov Selkowitz <yselkowi@redhat.com>
Date : 2026-04-17T16:32:50-04:00
Stats : +127/-9 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/vlc/c/ded7dd48e938bb8d676e183307a7ef5689434b6a?branch=epel10
Log:
Re-enable spatialaudio
https://code.videolan.org/videolan/vlc/-/merge_requests/8921
---
diff --git a/8921.patch b/8921.patch
new file mode 100644
index 0000000..13baafd
--- /dev/null
+++ b/8921.patch
@@ -0,0 +1,125 @@
+From 62b5f87ed9af884298fe6e637d5fa55d0fe246a5 Mon Sep 17 00:00:00 2001
+From: Marvin Scholz <epirat07@gmail.com>
+Date: Thu, 5 Feb 2026 16:33:37 +0100
+Subject: [PATCH 1/2] buildsystem: detect new libspatialaudio
+
+We can use the presence of the version header to detect libspatialaudio
+0.4.0 or higher. (For more granular checks in the future, the defines
+from the version header can be checked)
+
+(cherry picked from commit 93c2e6ec320016a3b3a3764db44fc7434d37d031) (edited)
+edited:
+- VLC 3 doesn't have meson
+Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
+---
+ configure.ac | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index e3d5fc62790..ed8274f7c61 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2895,6 +2895,15 @@ dnl Ambisonic channel mixer and binauralizer plugin
+ dnl
+ PKG_ENABLE_MODULES_VLC([SPATIALAUDIO], [], [spatialaudio], [Ambisonic channel mixer and binauralizer], [auto])
+
++AS_IF([test -n ${SPATIALAUDIO_CFLAGS+set}], [
++ VLC_SAVE_FLAGS
++ AX_APPEND_FLAG([$SPATIALAUDIO_CFLAGS], [CFLAGS])
++ AC_CHECK_HEADER([spatialaudio/SpatialaudioVersion.h], [
++ AX_APPEND_FLAG([-DHAVE_SPATIALAUDIOVERSION_H=1], [SPATIALAUDIO_CFLAGS])
++ ])
++ VLC_RESTORE_FLAGS
++])
++
+ dnl
+ dnl theora decoder plugin
+ dnl
+--
+GitLab
+
+
+From ea82edcc10c2daad60fa4be8013eac25b7ed8f0f Mon Sep 17 00:00:00 2001
+From: Marvin Scholz <epirat07@gmail.com>
+Date: Thu, 5 Feb 2026 16:34:35 +0100
+Subject: [PATCH 2/2] modules: spatialaudio: compat with new API
+
+This merely makes it build with the new API and doesn't yet migrate
+to newer APIs.
+
+(cherry picked from commit a41efcaf1d0b799f0d85d2ca0c59a9c677153cc4) (rebased)
+rebased:
+- VLC 3 still has the spatialaudio-headphones option
+Signed-off-by: Steve Lhomme <robux4@ycbcr.xyz>
+---
+ .../channel_mixer/spatialaudio.cpp | 39 +++++++++++++++++--
+ 1 file changed, 35 insertions(+), 4 deletions(-)
+
+diff --git a/modules/audio_filter/channel_mixer/spatialaudio.cpp b/modules/audio_filter/channel_mixer/spatialaudio.cpp
+index ec3b0e7489c..311ab0c462e 100644
+--- a/modules/audio_filter/channel_mixer/spatialaudio.cpp
++++ b/modules/audio_filter/channel_mixer/spatialaudio.cpp
+@@ -43,6 +43,23 @@
+ #include <spatialaudio/Ambisonics.h>
+ #include <spatialaudio/SpeakersBinauralizer.h>
+
++#ifdef HAVE_SPATIALAUDIOVERSION_H
++# include <spatialaudio/SpatialaudioVersion.h>
++#else
++# define SPATIALAUDIO_API_VERSION_MAJOR 0
++#endif
++
++#if SPATIALAUDIO_API_VERSION_MAJOR >= 2
++ using namespace spaudio;
++ using CAmbisonicBinauralizer = spaudio::AmbisonicBinauralizer;
++ using CAmbisonicDecoder = spaudio::AmbisonicDecoder;
++ using CAmbisonicProcessor = spaudio::AmbisonicProcessor;
++ using CAmbisonicZoomer = spaudio::AmbisonicZoomer;
++ using CAmbisonicSpeaker = spaudio::AmbisonicSpeaker;
++ using CBFormat = spaudio::BFormat;
++ #define kAmblib_CustomSpeakerSetUp Amblib_SpeakerSetUps::kAmblib_CustomSpeakerSetUp
++#endif
++
+ #define CFG_PREFIX "spatialaudio-"
+
+ #define DEFAULT_HRTF_PATH "hrtfs" DIR_SEP "dodeca_and_7channel_3DSL_HRTF.sofa"
+@@ -460,10 +477,18 @@ static int Open(vlc_object_t *p_this)
+ p_sys->mode = filter_spatialaudio::AMBISONICS_DECODER;
+
+ unsigned i_nbChannels = aout_FormatNbChannels(&p_filter->fmt_out.audio);
+- if (i_nbChannels == 1
+- || !p_sys->speakerDecoder.Configure(p_sys->i_order, true,
+- kAmblib_CustomSpeakerSetUp,
+- i_nbChannels))
++ bool ok = false;
++ if (i_nbChannels > 1) {
++#if SPATIALAUDIO_API_VERSION_MAJOR >= 2
++ ok = p_sys->speakerDecoder.Configure(p_sys->i_order, true,
++ AMB_BLOCK_TIME_LEN, p_filter->fmt_in.audio.i_rate,
++ kAmblib_CustomSpeakerSetUp, i_nbChannels);
++#else
++ ok = p_sys->speakerDecoder.Configure(p_sys->i_order, true,
++ kAmblib_CustomSpeakerSetUp, i_nbChannels);
++#endif
++ }
++ if (!ok)
+ {
+ msg_Err(p_filter, "Error creating the Ambisonics decoder.");
+ delete p_sys;
+@@ -509,7 +534,13 @@ static int Open(vlc_object_t *p_this)
+ return VLC_EGENERIC;
+ }
+
++#if SPATIALAUDIO_API_VERSION_MAJOR >= 2
++ if (!p_sys->zoomer.Configure(p_sys->i_order, true,
++ AMB_BLOCK_TIME_LEN,
++ p_filter->fmt_in.audio.i_rate))
++#else
+ if (!p_sys->zoomer.Configure(p_sys->i_order, true, 0))
++#endif
+ {
+ msg_Err(p_filter, "Error creating the ambisonic zoomer.");
+ delete p_sys;
+--
+GitLab
+
diff --git a/vlc.spec b/vlc.spec
index 8342322..f3cb2a5 100644
--- a/vlc.spec
+++ b/vlc.spec
@@ -15,9 +15,6 @@
%bcond postproc %[!(0%{?fedora} >= 44 || 0%{?rhel} >= 11)]
# disabled due to various issues
%bcond projectm 0
-# Temporary disable libspatialaudio until upstream pick
-# https://code.videolan.org/videolan/vlc/-/issues/29493
-%bcond spatialaudio %[!(0%{?fedora} >= 44 || 0%{?rhel} >= 11)]
# some dependencies are not yet in EPEL 10
%bcond daala 1
@@ -55,6 +52,8 @@ Source: https://get.videolan.org/vlc/%{version}/vlc-%{version}.tar.xz
Source: macros.vlc
## upstream patches
+# spatialaudio: fix compilation with libspatialaudio 4.0
+Patch: 8921.patch
## backported patches from master
# freerdp: update to freerdp 2.0 api (#2278)
@@ -227,9 +226,7 @@ BuildRequires: pkgconfig(shout) >= 2.1
BuildRequires: pkgconfig(smbclient)
BuildRequires: pkgconfig(soxr) >= 0.1.2
BuildRequires: pkgconfig(sqlite3)
-%if %{with spatialaudio}
BuildRequires: pkgconfig(spatialaudio)
-%endif
BuildRequires: pkgconfig(speex) >= 1.0.5
BuildRequires: pkgconfig(speexdsp)
BuildRequires: pkgconfig(srt) >= 1.3.0
@@ -675,9 +672,7 @@ export LIVE555_PREFIX=%{_prefix}
--enable-tremor \
--enable-speex \
--enable-opus \
-%if %{with spatialaudio}
--enable-spatialaudio \
-%endif
--enable-theora \
--enable-oggspots \
--enable-daala%{!?with_daala:=no} \
@@ -1152,9 +1147,7 @@ make check
%{vlc_plugindir}/audio_filter/libmad_plugin.so
%{vlc_plugindir}/audio_filter/libsamplerate_plugin.so
%{vlc_plugindir}/audio_filter/libsoxr_plugin.so
-%if %{with spatialaudio}
%{vlc_plugindir}/audio_filter/libspatialaudio_plugin.so
-%endif
%{vlc_plugindir}/audio_filter/libspeex_resampler_plugin.so
%{vlc_plugindir}/codec/libaom_plugin.so
%{vlc_plugindir}/codec/libaribsub_plugin.so
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-23 14:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 14:55 [rpms/vlc] epel10: Re-enable spatialaudio Yaakov Selkowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox