aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-17 23:57:30 +0100
committerMax Kellermann <max@duempel.org>2014-01-17 23:57:30 +0100
commita52cae1dba188db8bc7c72102cbb1ef57639b843 (patch)
treec0bc5b54fbf26628aedcf988545c7f773ae5a1e0 /src/pcm
parent61b01f82ef0582d194d8adfa137a09f71ce728c1 (diff)
downloadmpd-a52cae1dba188db8bc7c72102cbb1ef57639b843.tar.gz
mpd-a52cae1dba188db8bc7c72102cbb1ef57639b843.tar.xz
mpd-a52cae1dba188db8bc7c72102cbb1ef57639b843.zip
pcm/Volume: make DSD a no-op
Kludge to work around DSD playback failure because the ReplayGainFilterPlugin is always in the filter chain.
Diffstat (limited to 'src/pcm')
-rw-r--r--src/pcm/Volume.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/pcm/Volume.cxx b/src/pcm/Volume.cxx
index 64394a202..b12d8fd41 100644
--- a/src/pcm/Volume.cxx
+++ b/src/pcm/Volume.cxx
@@ -103,7 +103,6 @@ PcmVolume::Open(SampleFormat _format, Error &error)
switch (_format) {
case SampleFormat::UNDEFINED:
- case SampleFormat::DSD:
error.Format(pcm_domain,
"Software volume for %s is not implemented",
sample_format_to_string(_format));
@@ -115,6 +114,10 @@ PcmVolume::Open(SampleFormat _format, Error &error)
case SampleFormat::S32:
case SampleFormat::FLOAT:
break;
+
+ case SampleFormat::DSD:
+ // TODO: implement this; currently, it's a no-op
+ break;
}
format = _format;
@@ -139,7 +142,6 @@ PcmVolume::Apply(ConstBuffer<void> src)
switch (format) {
case SampleFormat::UNDEFINED:
- case SampleFormat::DSD:
assert(false);
gcc_unreachable();
@@ -177,6 +179,10 @@ PcmVolume::Apply(ConstBuffer<void> src)
src.size / sizeof(float),
pcm_volume_to_float(volume));
break;
+
+ case SampleFormat::DSD:
+ // TODO: implement this; currently, it's a no-op
+ return src;
}
return { data, src.size };