Commit a52cae1d authored by Max Kellermann's avatar Max Kellermann

pcm/Volume: make DSD a no-op

Kludge to work around DSD playback failure because the ReplayGainFilterPlugin is always in the filter chain.
parent 61b01f82
...@@ -103,7 +103,6 @@ PcmVolume::Open(SampleFormat _format, Error &error) ...@@ -103,7 +103,6 @@ PcmVolume::Open(SampleFormat _format, Error &error)
switch (_format) { switch (_format) {
case SampleFormat::UNDEFINED: case SampleFormat::UNDEFINED:
case SampleFormat::DSD:
error.Format(pcm_domain, error.Format(pcm_domain,
"Software volume for %s is not implemented", "Software volume for %s is not implemented",
sample_format_to_string(_format)); sample_format_to_string(_format));
...@@ -115,6 +114,10 @@ PcmVolume::Open(SampleFormat _format, Error &error) ...@@ -115,6 +114,10 @@ PcmVolume::Open(SampleFormat _format, Error &error)
case SampleFormat::S32: case SampleFormat::S32:
case SampleFormat::FLOAT: case SampleFormat::FLOAT:
break; break;
case SampleFormat::DSD:
// TODO: implement this; currently, it's a no-op
break;
} }
format = _format; format = _format;
...@@ -139,7 +142,6 @@ PcmVolume::Apply(ConstBuffer<void> src) ...@@ -139,7 +142,6 @@ PcmVolume::Apply(ConstBuffer<void> src)
switch (format) { switch (format) {
case SampleFormat::UNDEFINED: case SampleFormat::UNDEFINED:
case SampleFormat::DSD:
assert(false); assert(false);
gcc_unreachable(); gcc_unreachable();
...@@ -177,6 +179,10 @@ PcmVolume::Apply(ConstBuffer<void> src) ...@@ -177,6 +179,10 @@ PcmVolume::Apply(ConstBuffer<void> src)
src.size / sizeof(float), src.size / sizeof(float),
pcm_volume_to_float(volume)); pcm_volume_to_float(volume));
break; break;
case SampleFormat::DSD:
// TODO: implement this; currently, it's a no-op
return src;
} }
return { data, src.size }; return { data, src.size };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment