Commit 58487e48 authored by Max Kellermann's avatar Max Kellermann

filter/route: use PcmSilence()

parent 104075f3
...@@ -47,9 +47,11 @@ ...@@ -47,9 +47,11 @@
#include "filter/FilterInternal.hxx" #include "filter/FilterInternal.hxx"
#include "filter/FilterRegistry.hxx" #include "filter/FilterRegistry.hxx"
#include "pcm/PcmBuffer.hxx" #include "pcm/PcmBuffer.hxx"
#include "pcm/Silence.hxx"
#include "util/StringUtil.hxx" #include "util/StringUtil.hxx"
#include "util/Error.hxx" #include "util/Error.hxx"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include "util/WritableBuffer.hxx"
#include <algorithm> #include <algorithm>
...@@ -266,9 +268,8 @@ RouteFilter::FilterPCM(ConstBuffer<void> src, gcc_unused Error &error) ...@@ -266,9 +268,8 @@ RouteFilter::FilterPCM(ConstBuffer<void> src, gcc_unused Error &error)
(unsigned)sources[c] >= input_format.channels) { (unsigned)sources[c] >= input_format.channels) {
// No source for this destination output, // No source for this destination output,
// give it zeroes as input // give it zeroes as input
memset(chan_destination, PcmSilence({chan_destination, bytes_per_frame_per_channel},
0x00, input_format.format);
bytes_per_frame_per_channel);
} else { } else {
// Get the data from channel sources[c] // Get the data from channel sources[c]
// and copy it to the output // and copy it to the output
......
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