VISR  0.11.6
Versatile Interactive Scene Renderer
hoa_allrad_gain_calculator.hpp
Go to the documentation of this file.
1 /* Copyright Institute of Sound and Vibration Research - All rights reserved */
2 
3 #ifndef VISR_LIBRCL_HOA_ALLRAP_GAIN_CALCULATOR_HPP_INCLUDED
4 #define VISR_LIBRCL_HOA_ALLRAP_GAIN_CALCULATOR_HPP_INCLUDED
5 
6 #include "export_symbols.hpp"
7 
8 #include <libvisr/constants.hpp>
12 
13 #include <libobjectmodel/object.hpp> // needed basically for type definitions
14 
15 #include <libpanning/AllRAD.h>
17 #include <libpanning/VBAP.h>
18 #include <libpanning/XYZ.h>
19 
23 #include <libpml/object_vector.hpp>
25 
26 #include <vector>
27 
28 namespace visr
29 {
30 // forward declarations
31 namespace objectmodel
32 {
33 class ObjectVector;
34 }
35 namespace efl
36 {
37 template< typename SampleType > class BasicMatrix;
38 }
39 
40 namespace rcl
41 {
42 
48 class VISR_RCL_LIBRARY_SYMBOL HoaAllRadGainCalculator: public AtomicComponent
49 {
50 public:
55 
69  explicit HoaAllRadGainCalculator( SignalFlowContext const & context,
70  char const * name,
71  CompositeComponent * parent,
72  std::size_t numberOfObjectChannels,
73  panning::LoudspeakerArray const & regularArrayConfig,
74  panning::LoudspeakerArray const & realArrayConfig,
75  efl::BasicMatrix<Afloat> const & decodeMatrix,
76  pml::ListenerPosition const & listenerPosition = pml::ListenerPosition(),
77  bool adaptiveListenerPosition = false );
78 
83 
84 
89 
93  void process() override;
94 
95 private:
96 
107  void setListenerPosition( CoefficientType x, CoefficientType y, CoefficientType z );
108 
117  void setListenerPosition( pml::ListenerPosition const & pos );
118 
120 
122 
124 
125  std::unique_ptr<ParameterInput<pml::DoubleBufferingProtocol, pml::ListenerPosition > > mListenerInput;
126 
127  std::unique_ptr<panning::AllRAD> mAllRadCalculator;
128 
133  efl::BasicMatrix<Afloat> mRegularDecodeMatrix;
134 
135  efl::BasicMatrix<Afloat> mRealDecodeMatrix;
136 };
137 
138 } // namespace rcl
139 } // namespace visr
140 
141 #endif // #ifndef VISR_LIBRCL_HOA_ALLRAP_GAIN_CALCULATOR_HPP_INCLUDED
Definition: parameter_output.hpp:45
Definition: options.cpp:10
Definition: atomic_component.hpp:21
Definition: parameter_input.hpp:45
Definition: composite_component.hpp:29
Definition: LoudspeakerArray.h:42
Definition: signal_flow_context.hpp:15
Definition: hoa_allrad_gain_calculator.hpp:48
Definition: listener_position.hpp:31
SampleType CoefficientType
Definition: hoa_allrad_gain_calculator.hpp:54
float SampleType
Definition: constants.hpp:14