Audacity 3.2.0
Functions
anonymous_namespace{DownmixStage.cpp} Namespace Reference

Functions

void MixBuffers (unsigned numChannels, const unsigned char *channelFlags, const float *volumes, const float &src, AudioGraph::Buffers &dests, int len)
 

Function Documentation

◆ MixBuffers()

void anonymous_namespace{DownmixStage.cpp}::MixBuffers ( unsigned  numChannels,
const unsigned char *  channelFlags,
const float *  volumes,
const float &  src,
AudioGraph::Buffers dests,
int  len 
)

Definition at line 26 of file DownmixStage.cpp.

29{
30 const auto pSrc = &src;
31 for (unsigned int c = 0; c < numChannels; c++) {
32 if (!channelFlags[c])
33 continue;
34 auto dest = &dests.GetWritePosition(c);
35 for (int j = 0; j < len; ++j)
36 dest[j] += pSrc[j] * volumes[c]; // the actual mixing process
37 }
38}
float & GetWritePosition(unsigned iChannel)
Get writable position for one channel.

References AudioGraph::Buffers::GetWritePosition().

Referenced by DownmixStage::Acquire().

Here is the call graph for this function:
Here is the caller graph for this function: