VISR  0.11.6
Versatile Interactive Scene Renderer
listener_compensation.hpp
Go to the documentation of this file.
1 //
2 // LoudspeakerArray.h
3 //
4 // Created by Marcos F. Sim�n G�lvez on 02/02/2015.
5 // Copyright (c) 2014 ISVR, University of Southampton. All rights reserved.
6 //
7 
8 
9 #ifndef __S3A_renderer_dsp__listenerCompensation__
10 
11 #define __S3A_renderer_dsp__listenerCompensation__
12 
13 #include "export_symbols.hpp"
14 
15 #include <libefl/basic_matrix.hpp>
16 
20 
21 #include <libpanning/defs.h>
22 #include <libpanning/XYZ.h>
24 
25 #include <libefl/basic_vector.hpp>
26 
30 
31 #include <memory>
32 
33 namespace visr
34 {
35 
36 namespace rcl
37 {
38 
39 class VISR_RCL_LIBRARY_SYMBOL ListenerCompensation: public AtomicComponent
40 {
41 public:
43 public:
51  explicit ListenerCompensation( SignalFlowContext const & context,
52  char const * name,
53  CompositeComponent * parent,
54  panning::LoudspeakerArray const & arrayConfig );
55 
60 
65  void process() override;
66 
67 private:
68  std::size_t getNumSpeakers( ) const
69  {
70  return m_array.getNumSpeakers( );
71  }
72 
73  int setListenerPosition( Afloat x, Afloat y, Afloat z )
74  { //assigning the position of the listener
75  m_listenerPos.set( x, y, z );
76  return 0;
77  }
78 
84  int calcGainComp( efl::BasicVector<Afloat> & gainComp ); // this function calculates the gain compensation
85 
91  int calcDelayComp( efl::BasicVector<Afloat> & delayComp ); // this function calculates the delay compensation
92 
93  panning::LoudspeakerArray m_array; //passing the address of the loudspeaker array
94  panning::XYZ m_listenerPos; //position of the listener
95  std::size_t const mNumberOfLoudspeakers;
96 
100 };//class Listener Compensation
101 
102 } // namespace rcl
103 } // namespace visr
104 
105 
106 #endif /* defined(__S3A_renderer_dsp__LoudspeakerArray__) */
Definition: XYZ.h:23
Definition: parameter_output.hpp:45
Definition: listener_compensation.hpp:39
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
visr::SampleType SampleType
Definition: listener_compensation.hpp:42
Definition: basic_vector.hpp:28
float SampleType
Definition: constants.hpp:14
float Afloat
Definition: defs.h:15