VISR
0.11.8
Versatile Interactive Scene Renderer
gain_matrix.hpp
Go to the documentation of this file.
1
/* Copyright Institute of Sound and Vibration Research - All rights reserved */
2
3
#ifndef VISR_LIBRCL_GAIN_MATRIX_HPP_INCLUDED
4
#define VISR_LIBRCL_GAIN_MATRIX_HPP_INCLUDED
5
6
#include "
export_symbols.hpp
"
7
8
#include <
libvisr/atomic_component.hpp
>
9
#include <
libvisr/audio_input.hpp
>
10
#include <
libvisr/audio_output.hpp
>
11
#include <
libvisr/constants.hpp
>
12
#include <
libvisr/parameter_input.hpp
>
13
14
// TODO: make it a forward declaration
15
#include <
librbbl/gain_matrix.hpp
>
16
17
// For some reason, the forward declaration causes a compile error on MSVC,
18
// so we include the header for the moment.
19
// Also, I am not sure whether it makes sense to use a separate type as an alias to efl::BasicMatrix
20
#include <
libpml/matrix_parameter.hpp
>
21
#include <
libpml/shared_data_protocol.hpp
>
22
23
#include <
libefl/aligned_array.hpp
>
24
25
26
#include <cstddef>
// for std::size_t
27
#include <memory>
28
#include <valarray>
29
30
namespace
visr
31
{
32
33
namespace
rcl
34
{
35
46
class
VISR_RCL_LIBRARY_SYMBOL
GainMatrix
:
public
AtomicComponent
47
{
48
using
SampleType =
visr::SampleType
;
49
public
:
56
explicit
GainMatrix
(
SignalFlowContext
const
& context,
57
char
const
* name,
58
CompositeComponent
* parent =
nullptr
);
59
72
void
setup( std::size_t numberOfInputs,
73
std::size_t numberOfOutputs,
74
std::size_t interpolationSteps,
75
SampleType initialGain = static_cast<SampleType>(0.0),
76
bool
controlInput =
true
);
88
void
setup( std::size_t numberOfInputs,
89
std::size_t numberOfOutputs,
90
std::size_t interpolationSteps,
91
efl::BasicMatrix< SampleType >
const
& initialGains,
92
bool
controlInput =
true
);
93
94
void
process( );
95
96
private
:
97
std::unique_ptr< rbbl::GainMatrix< SampleType > > mMatrix;
98
99
AudioInput
mInput;
100
AudioOutput
mOutput;
101
108
std::valarray<SampleType const *> mInputChannels;
109
std::valarray<SampleType * > mOutputChannels;
111
112
std::unique_ptr<ParameterInput<pml::SharedDataProtocol, pml::MatrixParameter<SampleType> > > mGainInput;
113
};
114
115
}
// namespace rcl
116
}
// namespace visr
117
118
#endif // #ifndef VISR_LIBRCL_GAIN_MATRIX_HPP_INCLUDED
gain_matrix.hpp
parameter_input.hpp
visr::AudioOutputT< SampleType >
visr
Definition:
options.cpp:10
visr::AtomicComponent
Definition:
atomic_component.hpp:21
visr::CompositeComponent
Definition:
composite_component.hpp:29
visr::SignalFlowContext
Definition:
signal_flow_context.hpp:15
matrix_parameter.hpp
audio_output.hpp
visr::AudioInputT< SampleType >
export_symbols.hpp
constants.hpp
aligned_array.hpp
atomic_component.hpp
shared_data_protocol.hpp
visr::SampleType
float SampleType
Definition:
constants.hpp:14
audio_input.hpp
visr::efl::BasicMatrix< SampleType >
visr::rcl::GainMatrix
Definition:
gain_matrix.hpp:46
src
librcl
gain_matrix.hpp
Generated on Fri Nov 16 2018 13:38:35 for VISR by
1.8.14