22 : mDownstream(downstream)
46 const auto end = channelFlags + numChannels;
47 std::fill(channelFlags,
end, 0);
50 std::copy(map, map + numChannels, channelFlags);
52 std::fill(channelFlags,
end, 1);
64 return mpMap ==
nullptr;
68 : mDownstream(downstream), mNChannels(channels)
91 for(
size_t i = 0; i < numChannels; ++i)
92 channelFlags[i] =
true;
96 for(
size_t i = 0; i < numChannels; ++i)
Upstream producer of sample streams, taking Buffers as external context.
void FindChannelFlags(unsigned char *channelFlags, size_t numChannels, size_t iChannel) override
bool CanMakeMono() const override
Returns true if source channels could be combined into mono if needed.
const WideSampleSequence & mSequence
SequenceDownmixSource(AudioGraph::Source &downstream, const WideSampleSequence &sequence, const ArrayOf< bool > *channelMap)
size_t NChannels() const override
Number of output channels of the underlying Source.
AudioGraph::Source & mDownstream
const ArrayOf< bool > * mpMap
float GetChannelGain(size_t channel) const override
Gain multiplier that should be applied to the channel.
AudioGraph::Source & GetDownstream() const override
Returns underlying AudioGraph::Source processed by Mixer.
AudioGraph::Source & GetDownstream() const override
Returns underlying AudioGraph::Source processed by Mixer.
SimpleDonwmixSource(AudioGraph::Source &downstream, size_t channels)
size_t NChannels() const override
Number of output channels of the underlying Source.
float GetChannelGain(size_t channel) const override
Gain multiplier that should be applied to the channel.
void FindChannelFlags(unsigned char *channelFlags, size_t numChannels, size_t iChannel) override
AudioGraph::Source & mDownstream
bool CanMakeMono() const override
Returns true if source channels could be combined into mono if needed.
virtual float GetChannelVolume(int channel) const =0
virtual size_t NChannels() const =0
A constant property.
bool IsMono(const Channel &channel)
Whether the channel is mono.
const char * end(const char *str) noexcept
void copy(const T *src, T *dst, int32_t n)