filter/route: use PcmSilence()
This commit is contained in:
parent
104075f3e0
commit
58487e484f
@ -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)
|
|||||||
(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
|
||||||
|
Loading…
Reference in New Issue
Block a user