HoaLibrary  2.0
High Order Ambisonics Library
 All Classes Namespaces Functions Enumerations Enumerator
Public Member Functions | List of all members
Hoa3D::Decoder Class Reference

The ambisonic decoder. More...

#include <Decoder.h>

Inheritance diagram for Hoa3D::Decoder:
Hoa3D::Ambisonic

Public Member Functions

 Decoder (unsigned int order, unsigned int numberOfLoudspeakers)
 
 ~Decoder ()
 
unsigned int getNumberOfLoudspeakers () const
 This method retrieve the number of loudspeakers. More...
 
void setLoudspeakerPosition (unsigned int index, double azimuth, double elevation)
 
double getLoudspeakerAzimuth (unsigned int index) const
 
double getLoudspeakerElevation (unsigned int index) const
 
void process (const float *input, float *output)
 
void process (const double *input, double *output)
 
- Public Member Functions inherited from Hoa3D::Ambisonic
 Ambisonic (unsigned int order)
 The ambisonic constructor. More...
 
 ~Ambisonic ()
 The ambisonic destructor. More...
 
unsigned int getOrder () const
 Retrieve the decomposition order. More...
 
unsigned int getNumberOfHarmonics () const
 Retrieve the number of harmonics. More...
 
int getHarmonicArgument (const unsigned int index) const
 Retrieve the argument of an harmonic. More...
 
unsigned int getHarmonicBand (const unsigned int index) const
 Retrieve the band of an harmonic. More...
 
std::string getHarmonicsName (const unsigned int index) const
 Retrieve a name for an harmonic. More...
 

Detailed Description

The ambisonic decoder.

The decoder should be used to decode a signal encoded in the spherical harmonics domain depending on a decomposition order and a number of loudspeakers.

Definition at line 18 of file Decoder.h.

Constructor & Destructor Documentation

Hoa3D::Decoder::Decoder ( unsigned int  order,
unsigned int  numberOfLoudspeakers 
)
The decoder constructor.
Parameters
orderThe order, must be at least 1.
numberOfLoudspeakersThe number of loudspeakers, must be at least (order + 1)^2.
shapeIs a sphere or a half sphere.

Definition at line 11 of file Decoder.cpp.

Hoa3D::Decoder::~Decoder ( )

The decoder destructor.

Definition at line 60 of file Decoder.cpp.

Member Function Documentation

double Hoa3D::Decoder::getLoudspeakerAzimuth ( unsigned int  index) const
Get loudspeaker azimuth value.
Parameters
indexThe index of the loudspeaker.
Returns
the azimuth value in radians.
See Also
getLoudspeakerElevation

Definition at line 38 of file Decoder.cpp.

double Hoa3D::Decoder::getLoudspeakerElevation ( unsigned int  index) const
Get loudspeakers elevation value.
Parameters
indexThe index of the loudspeaker.
Returns
the elevation value in radians.
See Also
getLoudspeakerAzimuth

Definition at line 44 of file Decoder.cpp.

unsigned int Hoa3D::Decoder::getNumberOfLoudspeakers ( ) const
inline

This method retrieve the number of loudspeakers.

Retrieve the number of loudspeakers.

Returns
The number of loudspeakers.

Definition at line 48 of file Decoder.h.

void Hoa3D::Decoder::process ( const float *  input,
float *  output 
)
This method performs the decoding with single precision.
Parameters
inputThe inputs array.
outputsThe output array that contains samples destinated to loudspeakers.

Definition at line 50 of file Decoder.cpp.

void Hoa3D::Decoder::process ( const double *  input,
double *  output 
)
This method performs the decoding with double precision.
Parameters
inputThe inputs array.
outputsThe output array that contains samples destinated to loudspeakers.

Definition at line 55 of file Decoder.cpp.

void Hoa3D::Decoder::setLoudspeakerPosition ( unsigned int  index,
double  azimuth,
double  elevation 
)
Set loudspeaker position.
Parameters
indexThe index of the loudspeaker.
azimuthAn azimuth value. In radian, between 0 and 2π.
elevationAn azimuth value. In radian, between 0 and 2π.

Definition at line 22 of file Decoder.cpp.