HOA Library
beta 3.0
High Order Ambisonics Library
|
The decoder class decodes a sound field in the harmonics domain through the planewaves domain. More...
#include <Hoa_Decoder.hpp>
Public Member Functions | |
Decoder (const size_t order, const size_t numberOfPlanewaves) hoa_noexcept | |
The decoder constructor. More... | |
virtual | ~Decoder ()=0 |
The destructor. More... | |
virtual void | process (const T *inputs, T *outputs) hoa_noexcept |
This method performs the decoding. More... | |
virtual void | prepare (const size_t vectorsize=64) |
This method computes the decoding matrix. More... | |
Public Member Functions inherited from ProcessorHarmonics< D, T > | |
ProcessorHarmonics (const size_t order) hoa_noexcept | |
The harmonics constructor. More... | |
virtual | ~ProcessorHarmonics () hoa_noexcept |
The harmonics destructor. | |
size_t | getDecompositionOrder () const hoa_noexcept |
Returns the order of decomposition. | |
size_t | getNumberOfHarmonics () const hoa_noexcept |
Returns the number of harmonics. | |
size_t | getHarmonicDegree (const size_t index) const hoa_noexcept |
Returns the degree of an harmonic. More... | |
long | getHarmonicOrder (const size_t index) const hoa_noexcept |
Returns the azimuthal order of an harmonic. More... | |
size_t | getHarmonicIndex (const size_t degree, const long order) const hoa_noexcept |
Returns the index of an harmonic given the degree and the azimuthal order. More... | |
std::string | getHarmonicName (const size_t index) const hoa_noexcept |
Returns the name of an harmonic. More... | |
T | getHarmonicNormalization (const size_t index) const hoa_noexcept |
Returns the normalization of an harmonic. More... | |
T | getHarmonicSemiNormalization (const size_t index) const hoa_noexcept |
Returns the semi-normalization of an harmonic. More... | |
Public Member Functions inherited from Processor< D, T > | |
virtual | ~Processor () hoa_noexcept |
The destructor. | |
Public Member Functions inherited from ProcessorPlanewaves< D, T > | |
ProcessorPlanewaves (const size_t nplws) hoa_noexcept | |
The planewaves constructor. More... | |
virtual | ~ProcessorPlanewaves () hoa_noexcept |
The planewaves destructor. | |
size_t | getNumberOfPlanewaves () const hoa_noexcept |
Returns the number of planewaves. | |
void | setPlanewavesRotation (const T x_axe, const T y_axe, const T z_axe) hoa_noexcept |
Sets the global rotation of the planewaves. More... | |
T | getPlanewavesRotationX () const hoa_noexcept |
Returns the angle of rotation around the x axis in radian of the planewaves. | |
T | getPlanewavesRotationY () const hoa_noexcept |
Returns the angle of rotation around the y axis in radian of the planewaves. | |
T | getPlanewavesRotationZ () const hoa_noexcept |
Returns the angle of rotation around the z axis in radian of the planewaves. | |
size_t | getPlanewaveIndex (const size_t index) hoa_noexcept |
Returns the index of a planewave. | |
void | setPlanewaveAzimuth (const size_t index, const T azimuth) hoa_noexcept |
Sets the azimuth of a planewave in radian. More... | |
void | setPlanewaveElevation (const size_t index, const T elevation) hoa_noexcept |
Sets the azimuth of a planewave in radian. More... | |
T | getPlanewaveAzimuth (const size_t index, const bool rotation=true) const hoa_noexcept |
Returns the azimuth of a planewave. More... | |
T | getPlanewaveElevation (const size_t index, const bool rotation=true) const hoa_noexcept |
Returns the elevation of a planewave. More... | |
T | getPlanewaveAbscissa (const size_t index, const bool rotation=true) const hoa_noexcept |
Returns the abscissa of a planewave. More... | |
T | getPlanewaveOrdinate (const size_t index, const bool rotation=true) const hoa_noexcept |
Returns the ordinate of a planewave. More... | |
T | getPlanewaveHeight (const size_t index, const bool rotation=true) const hoa_noexcept |
Returns the height of a planewave. More... | |
std::string | getPlanewaveName (const size_t index) const hoa_noexcept |
Retruns the name for a planewave. More... | |
The decoder class decodes a sound field in the harmonics domain through the planewaves domain.
The decoder should be used to decode a set the harmonics domain to a set of planewaves for loudspeakers. There are three types of decoder. Regular for a perfect circle or sphere of loudspeakers. Irregular when the loudspeakers are not equally spaced on the circle or the sphere. Binaural for headphone restitution.
Definition at line 23 of file Hoa_Decoder.hpp.
Decoder | ( | const size_t | order, |
const size_t | numberOfPlanewaves | ||
) |
The decoder constructor.
The decoder constructor allocates and initialize the base classes.
order | The order |
numberOfPlanewaves | The number of channels. |
|
pure virtual |
The destructor.
The destructor free the memory.
|
virtual |
This method performs the decoding.
You should use this method for in-place or not-in-place processing and sample by sample. The inputs array contains the spherical harmonics samples and the minimum size must be the number of harmonics and the outputs array contains the channels samples and the minimum size must be the number of channels.
inputs | The input array that contains the samples of the harmonics. |
outputs | The output array that contains samples destinated to the channels. |
Reimplemented from Processor< D, T >.
Reimplemented in DecoderIrregular< D, T >, and DecoderRegular< D, T >.
|
virtual |
This method computes the decoding matrix.
You should use this method after changing the position of the loudspeakers and/or calling the process method.
vectorsize | The vector size for binaural decoding. |
Reimplemented in DecoderIrregular< D, T >, and DecoderRegular< D, T >.