diff options
author | Max Kellermann <max@duempel.org> | 2016-07-01 21:22:21 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2016-07-01 21:22:21 +0200 |
commit | ba8e579e9b8126a694d1125e001acddbeb494299 (patch) | |
tree | b2eb697dfaa3ed91bbb7dd4d43c2063326dbf7f3 /src/pcm/Volume.cxx | |
parent | 072e39c9cf449ccb8d7be301768a769f479c2875 (diff) |
pcm/Volume: use 0x69 to generate DSD silence
Diffstat (limited to 'src/pcm/Volume.cxx')
-rw-r--r-- | src/pcm/Volume.cxx | 8 |
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 }; } |