HOA Library  beta 3.0
High Order Ambisonics Library
Public Member Functions | List of all members
DecoderBinaural< Hoa3d, T > Class Template Reference

The ambisonic binaural decoder. More...

#include <Hoa_Decoder.hpp>

Inheritance diagram for DecoderBinaural< Hoa3d, T >:
Decoder< Hoa3d, T > ProcessorHarmonics< Hoa3d, T > ProcessorPlanewaves< Hoa3d, T > Processor< D, T > Processor< D, T >

Public Member Functions

 DecoderBinaural (const size_t order)
 The binaural decoder constructor. More...
 
Decoder< Hoa3d, T >::Mode getMode () const hoa_noexcept hoa_override
 This method retrieves the mode of the decoder. More...
 
 ~DecoderBinaural ()
 The binaural decoder destructor. More...
 
void setCropSize (const size_t size) hoa_noexcept
 This method sets the crop size of the responses. More...
 
size_t getCropSize () const hoa_noexcept
 This method gets the crop size of the responses. More...
 
void prepare (const size_t vectorsize=64) hoa_override
 This method computes the decoding matrix. More...
 
void processBlock (const T **inputs, T **outputs) hoa_noexcept
 This method performs the binaural decoding and the convolution.
 
void process (const T *inputs, T *outputs) hoa_noexcept hoa_override
 This method performs the decoding. More...
 
- Public Member Functions inherited from Decoder< Hoa3d, T >
 Decoder (const size_t order, const size_t numberOfPlanewaves) hoa_noexcept
 The decoder constructor. More...
 
virtual ~Decoder ()
 The destructor. More...
 
- Public Member Functions inherited from ProcessorHarmonics< Hoa3d, 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...
 
getHarmonicNormalization (const size_t index) const hoa_noexcept
 Returns the normalization of an harmonic. More...
 
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< Hoa3d, 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...
 
getPlanewavesRotationX () const hoa_noexcept
 Returns the angle of rotation around the x axis in radian of the planewaves.
 
getPlanewavesRotationY () const hoa_noexcept
 Returns the angle of rotation around the y axis in radian of the planewaves.
 
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...
 
getPlanewaveAzimuth (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the azimuth of a planewave. More...
 
getPlanewaveElevation (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the elevation of a planewave. More...
 
getPlanewaveAbscissa (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the abscissa of a planewave. More...
 
getPlanewaveOrdinate (const size_t index, const bool rotation=true) const hoa_noexcept
 Returns the ordinate of a planewave. More...
 
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...
 

Detailed Description

template<typename T>
class hoa::DecoderBinaural< Hoa3d, T >

The ambisonic binaural decoder.

The binaural decoder should be used to decode an ambisonic sound field for headphones.

Definition at line 688 of file Hoa_Decoder.hpp.

Constructor & Destructor Documentation

DecoderBinaural ( const size_t  order)
inline

The binaural decoder constructor.

The binaural decoder constructor allocates and initialize the member values to the decoding matrix depending on a order of decomposition and a number of channels. The order and the number of channels must be at least 1.

Parameters
orderThe order

Definition at line 711 of file Hoa_Decoder.hpp.

~DecoderBinaural ( )
inline

The binaural decoder destructor.

The binaural decoder destructor free the memory.

Definition at line 732 of file Hoa_Decoder.hpp.

Member Function Documentation

Decoder<Hoa3d, T>::Mode getMode ( ) const
inlinevirtual

This method retrieves the mode of the decoder.

This method retrieves the mode of the decoder.

Returns
The mode of the decoder.

Reimplemented from Decoder< Hoa3d, T >.

Definition at line 727 of file Hoa_Decoder.hpp.

void setCropSize ( const size_t  size)
inline

This method sets the crop size of the responses.

This method sets the crop size of the responses.

Parameters
sizeThe crop size.

Definition at line 741 of file Hoa_Decoder.hpp.

size_t getCropSize ( ) const
inline

This method gets the crop size of the responses.

This method gets the crop size of the responses.

Returns
The crop size.

Definition at line 757 of file Hoa_Decoder.hpp.

void prepare ( const size_t  vectorsize = 64)
inlinevirtual

This method computes the decoding matrix.

You should use this method after changing the position of the loudspeakers.

Parameters
vectorsizeThe vector size for binaural decoding.

Implements Decoder< Hoa3d, T >.

Definition at line 773 of file Hoa_Decoder.hpp.

void process ( const T *  inputs,
T *  outputs 
)
inlinevirtual

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.

Parameters
inputsThe input array that contains the samples of the harmonics.
outputsThe output array that contains samples destinated to the channels.

Implements Decoder< Hoa3d, T >.

Definition at line 814 of file Hoa_Decoder.hpp.