summaryrefslogtreecommitdiff
path: root/src/pcm/Volume.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/pcm/Volume.cxx')
-rw-r--r--src/pcm/Volume.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pcm/Volume.cxx b/src/pcm/Volume.cxx
index b12d8fd41..37f90c582 100644
--- a/src/pcm/Volume.cxx
+++ b/src/pcm/Volume.cxx
@@ -134,9 +134,11 @@ PcmVolume::Apply(ConstBuffer<void> src)
if (volume == 0) {
/* optimized special case: 0% volume = memset(0) */
- /* TODO: is this valid for all sample formats? What
- about floating point? */
- memset(data, 0, src.size);
+ uint8_t pattern = 0;
+ if (format == SampleFormat::DSD)
+ pattern = 0x69;
+
+ memset(data, pattern, src.size);
return { data, src.size };
}