filter-chain: make sndfile optional

Replace the code paths that require sndfile with a fallback when the
dependency was not found.
This commit is contained in:
Wim Taymans 2021-08-12 09:59:56 +02:00
parent ce2b385318
commit f816f702a5
2 changed files with 72 additions and 42 deletions

View file

@ -325,7 +325,10 @@ sdl_dep = dependency('sdl2', required : get_option('sdl2'))
summary({'SDL 2': sdl_dep.found()}, bool_yn: true, section: 'Misc dependencies')
ncurses_dep = dependency('ncursesw', required : false)
sndfile_dep = dependency('sndfile', version : '>= 1.0.20', required : get_option('sndfile'))
summary({'sndfile': sndfile_dep.found()}, bool_yn: true, section: 'pw-cat/pw-play/pw-dump tool')
summary({'sndfile': sndfile_dep.found()}, bool_yn: true, section: 'pw-cat/pw-play/pw-dump/filter-chain')
if sndfile_dep.found()
cdata.set('HAVE_SNDFILE', 1)
endif
pulseaudio_dep = dependency('libpulse', required : get_option('libpulse'))
summary({'libpulse': pulseaudio_dep.found()}, bool_yn: true, section: 'Streaming between daemons')
avahi_dep = dependency('avahi-client', required : get_option('avahi'))