1#ifndef _VAE_MIXER_PROCESSOR
2#define _VAE_MIXER_PROCESSOR
4#include "../vae_types.hpp"
5#include "../pod/vae_bank.hpp"
6#include "../pod/vae_mixer.hpp"
7#include "../vae_voice_manager.hpp"
10namespace vae {
namespace core {
38 auto& sourceMixer = bank.
mixers[i];
40 if (sourceMixer.buffer.validSize() == 0) {
continue; }
42 for (
auto& effect : sourceMixer.effects) {
48 sourceMixer.buffer.multiply(sourceMixer.gain);
49 auto& targetMixer = bank.
mixers[sourceMixer.parent];
52 targetMixer.buffer.setValidSize(frames);
54 targetMixer.buffer.add(sourceMixer.buffer);
57 sourceMixer.buffer.set(0);
61 for (
auto& effect : masterMixer.effects) {
65 masterMixer.buffer.multiply(masterMixer.gain);
void mix(Effect &effect, ScratchBuffer &buffer)
void mix(VoiceManger &manager, Bank &bank, SampleIndex frames)
Process the mixers for a single bank.
EffectsProcessor mEffectsProcessor
There is only one voice pool and VAE and it's managed here.
AudioBuffer::Size SampleIndex
Contains Typedefinitions and basic structures use by the public API and internally.
Bank object containing Sources, Mixers and Events Can be loaded and unloaded at runtime.
HeapBuffer< Mixer > mixers
Audio Mixers which can have effects ! is presorted !
static constexpr MixerHandle MasterMixerHandle
This is the master mixer for a bank.
#define VAE_PROFILER_SCOPE_NAMED(name)
Profiles a scope and names it.
#define VAE_ASSERT(condition)