#include "Mix.h"
#include "MixerSource.h"
#include <cmath>
#include "EffectStage.h"
#include "Dither.h"
#include "Resample.h"
#include "WideSampleSequence.h"
#include "float_cast.h"
#include <numeric>
Go to the source code of this file.
|
#define | stackAllocate(T, count) static_cast<T*>(alloca(count * sizeof(T))) |
|
◆ stackAllocate
#define stackAllocate |
( |
|
T, |
|
|
|
count |
|
) |
| static_cast<T*>(alloca(count * sizeof(T))) |
◆ MixBuffers()
static void MixBuffers |
( |
unsigned |
numChannels, |
|
|
const unsigned char * |
channelFlags, |
|
|
const float * |
gains, |
|
|
const float & |
src, |
|
|
std::vector< std::vector< float > > & |
dests, |
|
|
int |
len |
|
) |
| |
|
static |
Definition at line 256 of file Mix.cpp.
259{
260 const auto pSrc = &src;
261 for (unsigned int c = 0; c < numChannels; c++) {
262 if (!channelFlags[c])
263 continue;
264 for (int j = 0; j < len; ++j)
265 dests[c][j] += pSrc[j] * gains[c];
266 }
267}
Referenced by Mixer::Process().