#include "Mix.h"
#include "MixerSource.h"
#include <cmath>
#include "EffectStage.h"
#include "Dither.h"
#include "SampleTrack.h"
#include "SampleTrackCache.h"
#include "Resample.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 255 of file Mix.cpp.
258{
259 const auto pSrc = &src;
260 for (unsigned int c = 0; c < numChannels; c++) {
261 if (!channelFlags[c])
262 continue;
263 float *dest = dests[c].data();
264 float gain = gains[c];
265 for (int j = 0; j < len; ++j)
266 *dest++ += pSrc[j] * gain;
267 }
268}
Referenced by Mixer::Process().