HoaLibrary
2.0
High Order Ambisonics Library
|
The ambisonic regular decoder. More...
#include <Decoder.h>
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... | |
![]() | |
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... | |
![]() | |
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 | |
![]() | |
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... | |
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.
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.
order | The order |
numberOfChannels | The 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.
|
inline |
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.
input | The input sample. |
outputs | The 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.
input | The input sample. |
outputs | The 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.
offset | An azimuth value. |
Definition at line 25 of file Decoder.cpp.