-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathchannelmixer.h
37 lines (34 loc) · 1.56 KB
/
channelmixer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include <QVarLengthArray>
#include "util/types.h"
#include "engine/enginemaster.h"
#include "effects/engineeffectsmanager.h"
class ChannelMixer {
public:
// This does not modify the input channel buffers. All manipulation of the input
// channel buffers is done after copying to a temporary buffer, then they are mixed
// to make the output buffer.
static void applyEffectsAndMixChannels(
const EngineMaster::GainCalculator& gainCalculator,
const QVarLengthArray<EngineMaster::ChannelInfo*,
kPreallocatedChannels>& activeChannels,
QVarLengthArray<EngineMaster::GainCache, kPreallocatedChannels>*
channelGainCache,
CSAMPLE* pOutput,
const ChannelHandle& outputHandle,
unsigned int iBufferSize,
unsigned int iSampleRate,
EngineEffectsManager* pEngineEffectsManager);
// This does modify the input channel buffers, then mixes them to make the output buffer.
static void applyEffectsInPlaceAndMixChannels(
const EngineMaster::GainCalculator& gainCalculator,
const QVarLengthArray<EngineMaster::ChannelInfo*,
kPreallocatedChannels>& activeChannels,
QVarLengthArray<EngineMaster::GainCache, kPreallocatedChannels>*
channelGainCache,
CSAMPLE* pOutput,
const ChannelHandle& outputHandle,
unsigned int iBufferSize,
unsigned int iSampleRate,
EngineEffectsManager* pEngineEffectsManager);
};