Browse Source

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)
pull/203/head
Marvin Scholz 6 months ago
committed by Steve Lhomme
parent
commit
93c2e6ec32
  1. 9
      configure.ac
  2. 9
      modules/audio_filter/meson.build

9
configure.ac

@ -2966,6 +2966,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

9
modules/audio_filter/meson.build

@ -157,10 +157,16 @@ vlc_modules += {
# Spatial audio (ambisonics/binaural) mixer
spatial_dep = dependency('spatialaudio', required: get_option('spatialaudio'))
if spatial_dep.found()
spatial_extra_cflags = []
if (spatial_dep.version().version_compare('>= 0.4.0'))
spatial_extra_cflags += ['-DHAVE_SPATIALAUDIOVERSION_H=1']
endif
vlc_modules += {
'name' : 'spatialaudio',
'sources' : files('channel_mixer/spatialaudio.cpp'),
'dependencies' : [spatial_dep]
'dependencies' : [spatial_dep],
'c_args' : spatial_extra_cflags
}
endif
@ -242,4 +248,3 @@ if rnnoise_dep.found()
'dependencies' : [m_lib, rnnoise_dep]
}
endif

Loading…
Cancel
Save