From ba8e579e9b8126a694d1125e001acddbeb494299 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 1 Jul 2016 21:22:21 +0200 Subject: pcm/Volume: use 0x69 to generate DSD silence --- src/pcm/Volume.cxx | 8 +++++--- 1 file 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 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 }; } -- cgit v1.2.3