diff options
author | Max Kellermann <max@musicpd.org> | 2020-01-17 19:15:28 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-01-17 19:15:28 +0100 |
commit | 452e1c1a6f4a1a099f7759acbe8b1b3fdf9d5a8c (patch) | |
tree | fd5edd2a76e13d98ad044ee125534fd48417b33c /src/pcm/Convert.cxx | |
parent | 8db86e282058dedae5837402370a3921b7e677c9 (diff) |
pcm/Convert: throw if !ENABLE_DSD
Diffstat (limited to 'src/pcm/Convert.cxx')
-rw-r--r-- | src/pcm/Convert.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pcm/Convert.cxx b/src/pcm/Convert.cxx index 1cfd186d8..d464d210e 100644 --- a/src/pcm/Convert.cxx +++ b/src/pcm/Convert.cxx @@ -39,8 +39,13 @@ PcmConvert::PcmConvert(const AudioFormat _src_format, assert(dest_format.IsValid()); AudioFormat format = _src_format; - if (format.format == SampleFormat::DSD) + if (format.format == SampleFormat::DSD) { +#ifdef ENABLE_DSD format.format = SampleFormat::FLOAT; +#else + throw std::runtime_error("DSD support is disabled"); +#endif + } enable_resampler = format.sample_rate != dest_format.sample_rate; if (enable_resampler) { |