#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))) |
|
|
template<typename T , typename F > |
std::vector< T > | anonymous_namespace{Mix.cpp}::initVector (size_t dim1, const F &f) |
|
template<typename T > |
std::vector< std::vector< T > > | anonymous_namespace{Mix.cpp}::initVector (size_t dim1, size_t dim2) |
|
void | anonymous_namespace{Mix.cpp}::ConsiderStages (const Mixer::Stages &stages, size_t &blockSize) |
|
size_t | anonymous_namespace{Mix.cpp}::FindBufferSize (const Mixer::Inputs &inputs, const std::optional< Mixer::Stages > &masterEffects, size_t bufferSize) |
|
static void | MixBuffers (unsigned numChannels, const unsigned char *channelFlags, const float *gains, const float &src, AudioGraph::Buffers &dests, int len) |
|
◆ 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, |
|
|
AudioGraph::Buffers & |
dests, |
|
|
int |
len |
|
) |
| |
|
static |
Definition at line 268 of file Mix.cpp.
271{
272 const auto pSrc = &src;
273 for (unsigned int c = 0; c < numChannels; c++) {
274 if (!channelFlags[c])
275 continue;
277 for (int j = 0; j < len; ++j)
278 dest[j] += pSrc[j] * gains[c];
279 }
280}
float & GetWritePosition(unsigned iChannel)
Get writable position for one channel.
References AudioGraph::Buffers::GetWritePosition().
Referenced by Mixer::Acquire().