diff --git a/meson_options.txt b/meson_options.txt index d6bd91ee6..d17ac1ca8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -128,6 +128,7 @@ option('mpg123', type: 'feature', description: 'MP3 decoder using libmpg123') option('opus', type: 'feature', description: 'Opus decoder plugin') option('sidplay', type: 'feature', description: 'C64 SID support via libsidplayfp or libsidplay2') option('sndfile', type: 'feature', description: 'libsndfile decoder plugin') +option('tremor', type: 'feature', description: 'Fixed-point vorbis decoder plugin') option('vorbis', type: 'feature', description: 'Vorbis decoder plugin') option('wavpack', type: 'feature', description: 'WavPack decoder plugin') option('wildmidi', type: 'feature', description: 'WildMidi decoder plugin') diff --git a/src/decoder/plugins/meson.build b/src/decoder/plugins/meson.build index e38310cf2..50845e4df 100644 --- a/src/decoder/plugins/meson.build +++ b/src/decoder/plugins/meson.build @@ -36,8 +36,9 @@ if flac_dep.found() ] endif -conf.set('ENABLE_VORBIS_DECODER', libvorbis_dep.found()) -if libvorbis_dep.found() +conf.set('ENABLE_VORBIS_DECODER', libvorbis_dep.found() or libvorbisidec_dep.found()) +conf.set('HAVE_TREMOR', libvorbisidec_dep.found()) +if libvorbis_dep.found() or libvorbisidec_dep.found() decoder_plugins_sources += [ 'VorbisDecoderPlugin.cxx', 'VorbisDomain.cxx', @@ -181,6 +182,7 @@ decoder_plugins = static_library( libsidplay_dep, libsndfile_dep, libvorbis_dep, + libvorbisidec_dep, ogg_dep, wavpack_dep, wildmidi_dep, diff --git a/src/lib/xiph/meson.build b/src/lib/xiph/meson.build index a5d6c1929..432958fee 100644 --- a/src/lib/xiph/meson.build +++ b/src/lib/xiph/meson.build @@ -1,6 +1,11 @@ libflac_dep = dependency('flac', version: '>= 1.2', required: get_option('flac')) libopus_dep = dependency('opus', required: get_option('opus')) libvorbis_dep = dependency('vorbis', required: get_option('vorbis')) +libvorbisidec_dep = dependency('vorbisidec', required: get_option('tremor')) + +if get_option('vorbis').enabled() and get_option('tremor').enabled() + error('Cannot build both, the Vorbis decoder AND the Tremor (Vorbis fixed-point) decoder') +endif libvorbisenc_dep = dependency('', required: false) if need_encoder and not get_option('vorbisenc').disabled() @@ -13,7 +18,7 @@ if need_encoder and not get_option('vorbisenc').disabled() endif endif -if libopus_dep.found() or libvorbis_dep.found() or libvorbisenc_dep.found() +if libopus_dep.found() or libvorbis_dep.found() or libvorbisenc_dep.found() or libvorbisidec_dep.found() libogg_dep = dependency('ogg') else libogg_dep = dependency('', required: false)