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

The ambisonic regular decoder. More...

#include <Decoder.h>

Inheritance diagram for Hoa2D::DecoderRegular:
Hoa2D::Ambisonic Hoa2D::Planewaves

Public Member Functions

 DecoderRegular (unsigned int order, unsigned int numberOfChannels)
 The regular decoder constructor. More...
 
 ~DecoderRegular ()
 The regular decoder destructor. More...
 
void setChannelsOffset (double offset)
 Set the offset of the channels. More...
 
double getChannelsOffset () const
 Get the offset of the channels. More...
 
void process (const float *input, float *output)
 This method performs the regular decoding with single precision. More...
 
void process (const double *input, double *output)
 This method performs the regular decoding with double precision. More...
 
- Public Member Functions inherited from Hoa2D::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...
 
long getHarmonicArgument (unsigned int index) const
 Retrieve the argument of an harmonic. More...
 
long getHarmonicBand (unsigned int index) const
 Retrieve the band of an harmonic. More...
 
std::string getHarmonicsName (unsigned int index) const
 Retrieve a name for an harmonic. More...
 
- Public Member Functions inherited from Hoa2D::Planewaves
 Planewaves (unsigned int numberOfChannels)
 The planewaves constructor. More...
 
 ~Planewaves ()
 The planewaves destructor. More...
 
unsigned int getNumberOfChannels () const
 Retrieve the number of channels. More...
 
double getChannelAzimuth (unsigned int index) const
 Retrieve the azimuth of a channel. More...
 
double getChannelAbscissa (unsigned int index) const
 Retrieve the abscissa of a channel. More...
 
double getChannelOrdinate (unsigned int index) const
 Retrieve the ordinate of a channel. More...
 
std::string getChannelName (unsigned int index)
 Retrieve a name for a channel. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Hoa2D::Planewaves
void setChannelAzimuth (unsigned int index, double azimuth)
 Set the azimuth of a channel. More...
 
void setChannelsAzimuth (double *azimuths)
 Set the azimtuh of all the channels. More...
 

Detailed Description

The ambisonic regular decoder.

The regular decoder should be used to decode an ambisonic sound field for a set a channels at equal distances on a circle depending on a decomposition order. The number of channels must be at least the number of harmonics. Note that you can only change the offset of the channels.

Definition at line 20 of file Decoder.h.

Constructor & Destructor Documentation

Hoa2D::DecoderRegular::DecoderRegular ( unsigned int  order,
unsigned int  numberOfChannels 
)

The regular decoder constructor.

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

Parameters
orderThe order
numberOfChannelsThe number of channels.

Definition at line 14 of file Decoder.cpp.

Hoa2D::DecoderRegular::~DecoderRegular ( )

The regular decoder destructor.

The regular decoder destructor free the memory.

Definition at line 51 of file Decoder.cpp.

Member Function Documentation

double Hoa2D::DecoderRegular::getChannelsOffset ( ) const
inline

Get the offset of the channels.

Retreive the azimuth offset of the channels in radian.

Returns
The offset of the channels.

Definition at line 57 of file Decoder.h.

void Hoa2D::DecoderRegular::process ( const float *  input,
float *  output 
)

This method performs the regular decoding with single precision.

You should use this method for in-place or not-in-place processing and performs the regular decoding 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 minimym size must be the number of channels.

Parameters
inputThe input sample.
outputsThe output array that contains samples destinated to channels.

Definition at line 41 of file Decoder.cpp.

void Hoa2D::DecoderRegular::process ( const double *  input,
double *  output 
)

This method performs the regular decoding with double precision.

You should use this method for in-place or not-in-place processing and performs the regular decoding 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 minimym size must be the number of channels.

Parameters
inputThe input sample.
outputsThe output array that contains samples destinated to channels.

Definition at line 46 of file Decoder.cpp.

void Hoa2D::DecoderRegular::setChannelsOffset ( double  offset)

Set the offset of the channels.

Set the azimuth offset of the channels in radian.

Parameters
offsetAn azimuth value.

Definition at line 25 of file Decoder.cpp.