meson: Add optional SoX Resampler support
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Sun, 21 Oct 2018 09:47:03 +0000 (16:47 +0700)
committerArun Raghavan <arun@arunraghavan.net>
Thu, 27 Dec 2018 11:55:56 +0000 (17:25 +0530)
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
meson.build
meson_options.txt
src/pulsecore/meson.build

index ebe5d52..4144276 100644 (file)
@@ -252,6 +252,11 @@ if gtk_dep.found()
   cdata.set('HAVE_GTK', 1)
 endif
 
+soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
+if soxr_dep.found()
+  cdata.set('HAVE_SOXR', 1)
+endif
+
 x11_dep = dependency('x11-xcb', required : get_option('x11'))
 if x11_dep.found()
   xcb_dep  = dependency('xcb',  required : true, version : '>= 1.6')
index 767ca19..fba85fa 100644 (file)
@@ -65,6 +65,9 @@ option('lirc',
 option('openssl',
        type : 'feature', value : 'auto',
        description : 'Optional OpenSSL support (used for Airtunes/RAOP)')
+option('soxr',
+       type : 'feature', value : 'auto',
+       description : 'Optional SoXR support (resampling)')
 option('speex',
        type : 'feature', value : 'auto',
        description : 'Optional Speex support (resampling, AEC)')
index a683004..96f8046 100644 (file)
@@ -126,6 +126,10 @@ if dbus_dep.found()
   ]
 endif
 
+if soxr_dep.found()
+  libpulsecore_sources += ['resampler/soxr.c']
+endif
+
 if speex_dep.found()
   libpulsecore_sources += ['resampler/speex.c']
 endif
@@ -163,7 +167,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
   c_args : [pa_c_args, server_c_args],
   install : true,
   link_with : libpulsecore_simd_lib,
-  dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, speex_dep, x11_dep],
+  dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, soxr_dep, speex_dep, x11_dep],
   implicit_include_directories : false)
 
 libpulsecore_dep = declare_dependency(link_with: libpulsecore)