aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmConvert.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-28 18:43:33 +0100
committerMax Kellermann <max@duempel.org>2013-11-28 18:43:33 +0100
commita788b7e747bc21b9aadee45dd028fa6198af794e (patch)
treee8374e00197db7810e21d9bedea02a70afa96430 /src/pcm/PcmConvert.hxx
parentbb288f02848793a85b74262063d1bd9c7bc7dd78 (diff)
downloadmpd-a788b7e747bc21b9aadee45dd028fa6198af794e.tar.gz
mpd-a788b7e747bc21b9aadee45dd028fa6198af794e.tar.xz
mpd-a788b7e747bc21b9aadee45dd028fa6198af794e.zip
PcmConvert: fix src_format corruption when converting from DSD
Method PcmConvert::Convert() modifies the src_format variable. This used to be a parameter, however commit d2679f59c made it an attribute instead. The modification to src_format persisted, and the next call would return garbage.
Diffstat (limited to '')
-rw-r--r--src/pcm/PcmConvert.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pcm/PcmConvert.hxx b/src/pcm/PcmConvert.hxx
index 02743b6cc..0672c2955 100644
--- a/src/pcm/PcmConvert.hxx
+++ b/src/pcm/PcmConvert.hxx
@@ -51,6 +51,13 @@ class PcmConvert {
AudioFormat src_format, dest_format;
+ /**
+ * Do we get DSD source data? Then this flag is true and
+ * src_format.format is set to SampleFormat::FLOAT, because
+ * the #PcmDsd class will convert it to floating point.
+ */
+ bool is_dsd;
+
public:
PcmConvert();
~PcmConvert();