meson.build 1.37 KB
Newer Older
1
pcm_basic_sources = [
2 3 4
  'CheckAudioFormat.cxx',
  'AudioFormat.cxx',
  'AudioParser.cxx',
5 6
  'SampleFormat.cxx',
  'Interleave.cxx',
7
  'Buffer.cxx',
8 9
  'Export.cxx',
  'Dop.cxx',
10 11
  'Volume.cxx',
  'Silence.cxx',
12 13
  'Mix.cxx',
  'Pack.cxx',
14
  'Order.cxx',
15
  'Dither.cxx',
16 17 18
]

if get_option('dsd')
19
  pcm_basic_sources += [
20 21 22
    'Dsd16.cxx',
    'Dsd32.cxx',
    'PcmDsd.cxx',
23
    'Dsd2Pcm.cxx',
24 25 26
  ]
endif

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
pcm_basic = static_library(
  'pcm_basic',
  pcm_basic_sources,
  include_directories: inc,
  dependencies: [
    util_dep,
  ],
)

pcm_basic_dep = declare_dependency(
  link_with: pcm_basic,
)

pcm_sources = [
  'Convert.cxx',
  'PcmChannels.cxx',
  'PcmFormat.cxx',
  'FormatConverter.cxx',
  'ChannelsConverter.cxx',
  'GlueResampler.cxx',
  'FallbackResampler.cxx',
  'ConfiguredResampler.cxx',
]

51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
libsamplerate_dep = dependency('samplerate', version: '>= 0.1.3', required: get_option('libsamplerate'))
if libsamplerate_dep.found()
  conf.set('ENABLE_LIBSAMPLERATE', true)
  pcm_sources += 'LibsamplerateResampler.cxx'
endif

soxr_dep = dependency('soxr', required: get_option('soxr'))
if soxr_dep.found()
  conf.set('ENABLE_SOXR', true)
  pcm_sources += 'SoxrResampler.cxx'
endif

pcm = static_library(
  'pcm',
  pcm_sources,
  include_directories: inc,
  dependencies: [
    util_dep,
69
    pcm_basic_dep,
70 71 72 73 74 75 76 77
    libsamplerate_dep,
    soxr_dep,
  ],
)

pcm_dep = declare_dependency(
  link_with: pcm,
)