mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
meson: Add ORC support
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
parent
06e37b3057
commit
aa5502926f
5 changed files with 59 additions and 16 deletions
18
meson.build
18
meson.build
|
|
@ -342,6 +342,19 @@ if gtk_dep.found()
|
||||||
cdata.set('HAVE_GTK', 1)
|
cdata.set('HAVE_GTK', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
have_orcc = false
|
||||||
|
orcc_args = []
|
||||||
|
orc_dep = dependency('orc-0.4', version : '>= 0.4.11', required : get_option('orc'))
|
||||||
|
orcc = find_program('orcc', required : get_option('orc'))
|
||||||
|
if orc_dep.found() and orcc.found()
|
||||||
|
have_orcc = true
|
||||||
|
orcc_args = [orcc]
|
||||||
|
#orcc_args = [orcc, '--include', 'glib.h']
|
||||||
|
cdata.set('HAVE_ORC', 1)
|
||||||
|
else
|
||||||
|
cdata.set('DISABLE_ORC', 1)
|
||||||
|
endif
|
||||||
|
|
||||||
samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
|
samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
|
||||||
if samplerate_dep.found()
|
if samplerate_dep.found()
|
||||||
cdata.set('HAVE_LIBSAMPLERATE', 1)
|
cdata.set('HAVE_LIBSAMPLERATE', 1)
|
||||||
|
|
@ -374,9 +387,6 @@ if x11_dep.found()
|
||||||
cdata.set('HAVE_X11', 1)
|
cdata.set('HAVE_X11', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# FIXME: support ORC
|
|
||||||
cdata.set('DISABLE_ORC', 1)
|
|
||||||
|
|
||||||
# Module dependencies
|
# Module dependencies
|
||||||
|
|
||||||
if cc.has_header('sys/soundcard.h')
|
if cc.has_header('sys/soundcard.h')
|
||||||
|
|
@ -590,7 +600,7 @@ summary = [
|
||||||
'Enable IPv6: @0@'.format(get_option('ipv6')),
|
'Enable IPv6: @0@'.format(get_option('ipv6')),
|
||||||
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
|
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
|
||||||
'Enable FFTW: @0@'.format(fftw_dep.found()),
|
'Enable FFTW: @0@'.format(fftw_dep.found()),
|
||||||
# 'Enable orc: @0@'.format(${ENABLE_ORC}),
|
'Enable ORC: @0@'.format(have_orcc),
|
||||||
'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')),
|
'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')),
|
||||||
'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
|
'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
|
||||||
'Enable SoXR (resampler): @0@'.format(soxr_dep.found()),
|
'Enable SoXR (resampler): @0@'.format(soxr_dep.found()),
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,9 @@ option('lirc',
|
||||||
option('openssl',
|
option('openssl',
|
||||||
type : 'feature', value : 'auto',
|
type : 'feature', value : 'auto',
|
||||||
description : 'Optional OpenSSL support (used for Airtunes/RAOP)')
|
description : 'Optional OpenSSL support (used for Airtunes/RAOP)')
|
||||||
|
option('orc',
|
||||||
|
type : 'feature', value : 'auto',
|
||||||
|
description : 'Optimized Inner Loop Runtime Compiler')
|
||||||
option('samplerate',
|
option('samplerate',
|
||||||
type : 'feature', value : 'disabled',
|
type : 'feature', value : 'disabled',
|
||||||
description : 'Optional libsamplerate support (DEPRECATED)')
|
description : 'Optional libsamplerate support (DEPRECATED)')
|
||||||
|
|
|
||||||
|
|
@ -206,6 +206,7 @@ module_echo_cancel_sources = [
|
||||||
'echo-cancel/module-echo-cancel.c',
|
'echo-cancel/module-echo-cancel.c',
|
||||||
'echo-cancel/null.c',
|
'echo-cancel/null.c',
|
||||||
]
|
]
|
||||||
|
module_echo_cancel_orc_sources = []
|
||||||
module_echo_cancel_flags = []
|
module_echo_cancel_flags = []
|
||||||
module_echo_cancel_deps = []
|
module_echo_cancel_deps = []
|
||||||
module_echo_cancel_libs = []
|
module_echo_cancel_libs = []
|
||||||
|
|
@ -216,15 +217,25 @@ if get_option('adrian-aec')
|
||||||
'echo-cancel/adrian-aec.c', 'echo-cancel/adrian-aec.h',
|
'echo-cancel/adrian-aec.c', 'echo-cancel/adrian-aec.h',
|
||||||
]
|
]
|
||||||
module_echo_cancel_flags += ['-DHAVE_ADRIAN_EC=1']
|
module_echo_cancel_flags += ['-DHAVE_ADRIAN_EC=1']
|
||||||
module_echo_cancel_deps = [libm_dep]
|
module_echo_cancel_deps += [libm_dep]
|
||||||
endif
|
|
||||||
|
|
||||||
# FIXME: support ORC (depends on Adrian)
|
if have_orcc
|
||||||
#ORC_SOURCE += modules/echo-cancel/adrian-aec
|
orcsrc = 'adrian-aec'
|
||||||
#module_echo_cancel_sources += [
|
orc_h = custom_target(orcsrc + '-orc-gen.h',
|
||||||
# 'echo-cancel/adrian-aec-orc-gen.c', 'echo-cancel/adrian-aec-orc-gen.h'
|
input : join_paths('echo-cancel', orcsrc + '.orc'),
|
||||||
#]
|
output : orcsrc + '-orc-gen.h',
|
||||||
#module_echo_cancel_deps += [orc_dep]
|
command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']
|
||||||
|
)
|
||||||
|
orc_c = custom_target(orcsrc + '-orc-gen.c',
|
||||||
|
input : join_paths('echo-cancel', orcsrc + '.orc'),
|
||||||
|
output : orcsrc + '-orc-gen.c',
|
||||||
|
command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']
|
||||||
|
)
|
||||||
|
module_echo_cancel_orc_sources += [orc_c, orc_h]
|
||||||
|
module_echo_cancel_deps += [orc_dep]
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
if speex_dep.found()
|
if speex_dep.found()
|
||||||
module_echo_cancel_sources += ['echo-cancel/speex.c']
|
module_echo_cancel_sources += ['echo-cancel/speex.c']
|
||||||
|
|
@ -238,7 +249,7 @@ endif
|
||||||
|
|
||||||
all_modules += [
|
all_modules += [
|
||||||
[ 'module-echo-cancel',
|
[ 'module-echo-cancel',
|
||||||
module_echo_cancel_sources,
|
module_echo_cancel_sources + module_echo_cancel_orc_sources,
|
||||||
[],
|
[],
|
||||||
module_echo_cancel_flags,
|
module_echo_cancel_flags,
|
||||||
module_echo_cancel_deps,
|
module_echo_cancel_deps,
|
||||||
|
|
|
||||||
|
|
@ -145,6 +145,24 @@ if x11_dep.found()
|
||||||
libpulsecore_headers += ['x11wrap.h']
|
libpulsecore_headers += ['x11wrap.h']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
orc_sources = []
|
||||||
|
orc_headers = []
|
||||||
|
if have_orcc
|
||||||
|
orcsrc = 'svolume'
|
||||||
|
orc_h = custom_target(orcsrc + '-ocr-gen.h',
|
||||||
|
input : orcsrc + '.orc',
|
||||||
|
output : orcsrc + '-orc-gen.h',
|
||||||
|
command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@']
|
||||||
|
)
|
||||||
|
orc_c = custom_target(orcsrc + '-orc-gen.c',
|
||||||
|
input : orcsrc + '.orc',
|
||||||
|
output : orcsrc + '-orc-gen.c',
|
||||||
|
command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@']
|
||||||
|
)
|
||||||
|
orc_sources = [orc_c, 'svolume_orc.c']
|
||||||
|
orc_headers = [orc_h]
|
||||||
|
endif
|
||||||
|
|
||||||
# FIXME: walk through dependencies and add files
|
# FIXME: walk through dependencies and add files
|
||||||
|
|
||||||
# FIXME: SIMD support (ORC)
|
# FIXME: SIMD support (ORC)
|
||||||
|
|
@ -167,14 +185,14 @@ cdata.merge_from(libpulsecore_simd[1])
|
||||||
#'thread-win32.c',
|
#'thread-win32.c',
|
||||||
|
|
||||||
libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
|
libpulsecore = shared_library('pulsecore-' + pa_version_major_minor,
|
||||||
libpulsecore_sources,
|
libpulsecore_sources, libpulsecore_headers,
|
||||||
libpulsecore_headers,
|
orc_sources, orc_headers,
|
||||||
include_directories : [configinc, topinc],
|
include_directories : [configinc, topinc],
|
||||||
c_args : [pa_c_args, server_c_args],
|
c_args : [pa_c_args, server_c_args],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : privlibdir,
|
install_dir : privlibdir,
|
||||||
link_with : libpulsecore_simd_lib,
|
link_with : libpulsecore_simd_lib,
|
||||||
dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep],
|
dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep],
|
||||||
implicit_include_directories : false)
|
implicit_include_directories : false)
|
||||||
|
|
||||||
libpulsecore_dep = declare_dependency(link_with: libpulsecore)
|
libpulsecore_dep = declare_dependency(link_with: libpulsecore)
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ echo_cancel_test_sources = []
|
||||||
foreach s : module_echo_cancel_sources
|
foreach s : module_echo_cancel_sources
|
||||||
echo_cancel_test_sources += '../modules/' + s
|
echo_cancel_test_sources += '../modules/' + s
|
||||||
endforeach
|
endforeach
|
||||||
|
echo_cancel_test_sources += module_echo_cancel_orc_sources
|
||||||
|
|
||||||
norun_tests += [
|
norun_tests += [
|
||||||
[ 'echo-cancel-test', echo_cancel_test_sources,
|
[ 'echo-cancel-test', echo_cancel_test_sources,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue