aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmConvert.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-09-26 10:52:46 +0200
committerMax Kellermann <max@duempel.org>2014-09-26 12:17:47 +0200
commit3120958a17f1fcbfc90d0c2ee2ede9e31c4cf09d (patch)
treebf4676aedfb4f6a1a900d8563c2448a30886d558 /src/pcm/PcmConvert.cxx
parent052726ed50f1600d5ffca41291528364435ff65e (diff)
downloadmpd-3120958a17f1fcbfc90d0c2ee2ede9e31c4cf09d.tar.gz
mpd-3120958a17f1fcbfc90d0c2ee2ede9e31c4cf09d.tar.xz
mpd-3120958a17f1fcbfc90d0c2ee2ede9e31c4cf09d.zip
pcm: --disable-dsd also disables the dsd2pcm library
Diffstat (limited to 'src/pcm/PcmConvert.cxx')
-rw-r--r--src/pcm/PcmConvert.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pcm/PcmConvert.cxx b/src/pcm/PcmConvert.cxx
index bbc5fc638..2b7cfe7f0 100644
--- a/src/pcm/PcmConvert.cxx
+++ b/src/pcm/PcmConvert.cxx
@@ -109,7 +109,9 @@ PcmConvert::Close()
if (enable_resampler)
resampler.Close();
+#ifdef ENABLE_DSD
dsd.Reset();
+#endif
#ifndef NDEBUG
src_format.Clear();
@@ -120,6 +122,7 @@ PcmConvert::Close()
ConstBuffer<void>
PcmConvert::Convert(ConstBuffer<void> buffer, Error &error)
{
+#ifdef ENABLE_DSD
if (src_format.format == SampleFormat::DSD) {
auto s = ConstBuffer<uint8_t>::FromVoid(buffer);
auto d = dsd.ToFloat(src_format.channels, s);
@@ -131,6 +134,7 @@ PcmConvert::Convert(ConstBuffer<void> buffer, Error &error)
buffer = d.ToVoid();
}
+#endif
if (enable_resampler) {
buffer = resampler.Resample(buffer, error);