summaryrefslogtreecommitdiff
path: root/src/pcm/Volume.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-07-09 00:46:09 +0200
committerMax Kellermann <max@duempel.org>2016-07-09 00:46:09 +0200
commitb67e7df38e852f6008a6cb26abcf149faa5e837a (patch)
treee3db5b1e76c0919e855d72da8cf7e88052b7c73c /src/pcm/Volume.cxx
parente068d62ac65bacd69de84a237e622a2a762e1d5d (diff)
parentf28c746b6bcfadb6df8abbe5d1ae9f418568ef2b (diff)
Merge tag 'v0.19.17'
release v0.19.17
Diffstat (limited to 'src/pcm/Volume.cxx')
-rw-r--r--src/pcm/Volume.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pcm/Volume.cxx b/src/pcm/Volume.cxx
index d8f83ad60..5e09fc3be 100644
--- a/src/pcm/Volume.cxx
+++ b/src/pcm/Volume.cxx
@@ -19,9 +19,11 @@
#include "config.h"
#include "Volume.hxx"
+#include "Silence.hxx"
#include "Domain.hxx"
#include "Traits.hxx"
#include "util/ConstBuffer.hxx"
+#include "util/WritableBuffer.hxx"
#include "util/Error.hxx"
#include "PcmDither.cxx" // including the .cxx file to get inlined templates
@@ -133,9 +135,7 @@ 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);
+ PcmSilence({data, src.size}, format);
return { data, src.size };
}