VISR  0.12.0
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_LIBRBBL_GAIN_MATRIX_HPP_INCLUDED
4 #define VISR_LIBRBBL_GAIN_MATRIX_HPP_INCLUDED
5 
6 #include "export_symbols.hpp"
7 #include "gain_fader.hpp"
8 
11 
12 namespace visr
13 {
14 namespace rbbl
15 {
16 
23 template< typename ElementType >
24 class VISR_RBBL_LIBRARY_SYMBOL GainMatrix
25 {
26 public:
38  explicit GainMatrix( std::size_t numberOfInputs,
39  std::size_t numberOfOutputs,
40  std::size_t blockLength,
41  std::size_t interpolationSteps,
42  ElementType initialValue = static_cast<ElementType>(0.0),
43  std::size_t alignment = 0 );
44 
56  explicit GainMatrix( std::size_t numberOfInputs,
57  std::size_t numberOfOutputs,
58  std::size_t blockLength,
59  std::size_t interpolationSteps,
60  efl::BasicMatrix<ElementType> const& initialGains,
61  std::size_t alignment = 0 );
62 
66  ~GainMatrix();
67 
77  void process( ElementType const * const * input, ElementType * const * output );
78 
92  void process( ElementType const * const * input, ElementType * const * output,
93  efl::BasicMatrix<ElementType> const& newGains);
94 
102  void setNewGains( efl::BasicMatrix<ElementType> const& newGains );
103 
104 private:
111  void processAudio( ElementType const * const * input, ElementType * const * output );
112 
117  void setGainsInternal( efl::BasicMatrix<ElementType> const & newGains );
118 
123  efl::BasicMatrix< ElementType > mPreviousGains;
124 
129 
133  std::size_t const mBlockSize;
134 
139  std::size_t const mAlignment;
140 
145  std::size_t mInterpolationCounter;
146 
151 };
152 
153 } // namespace rbbl
154 } // namespace visr
155 
156 #endif // #ifndef VISR_LIBRBBL_GAIN_MATRIX_HPP_INCLUDED
Definition: gain_matrix.hpp:24
Definition: options.cpp:10
Definition: gain_fader.hpp:23
Definition: init_filter_matrix.hpp:15