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

The kit to spatialize lught points sources. More...

#include <Kits.h>

Public Member Functions

 KitSources (unsigned int order)
 The sources kit constructor. More...
 
 ~KitSources ()
 The sources kit destructor. More...
 
void setOrder (unsigned int order)
 Set the decomposition order. More...
 
unsigned int getOrder () const
 Retrieve the decomposition order. More...
 
void setNumberOfSources (unsigned int numberOfSources)
 Set the number of sources. More...
 
unsigned int getNumberOfSources () const
 Retrieve the number of sources. More...
 
void setNumberOfChannels (unsigned int numberOfChannels)
 Set the number of channels. More...
 
unsigned int getNumberOfChannels () const
 Retrieve the number of channels. More...
 
void setDecodingMode (DecoderMulti::Mode mode)
 Set the decoding mode. More...
 
DecoderMulti::Mode getDecodingMode () const
 Retrieve the decoding mode. More...
 
void setOptimMode (Optim::Mode mode)
 This method set the optimization mode. More...
 
Optim::Mode getOptimMode () const
 Retrieve the optimization mode. More...
 
void setChannelsOffset (double offset)
 Set the offset of the channels for the regular decoding. More...
 
double getChannelsOffset () const
 Retrieve the offset of the channels . More...
 
void setSampleRate (unsigned int sampleRate)
 Set the sample rate. More...
 
unsigned int getSampleRate () const
 Retrieve the sample rate. More...
 
void setVectorSize (unsigned int vectorSize)
 Set the vector size. More...
 
unsigned int getVectorSize () const
 Retrieve the vector size. 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...
 

Detailed Description

The kit to spatialize lught points sources.

The KitSources is an all-in-one class that owns a Map, an Optim, a DecoderMulti, a Meter and a SourcesManager and that can be used to spatialize several sources. It allows to dynamicaly change the classes parameters.

Definition at line 23 of file Kits.h.

Constructor & Destructor Documentation

Hoa2D::KitSources::KitSources ( unsigned int  order)

The sources kit constructor.

The sources kit constructor all the classes.The order must be at least 1;

Parameters
orderThe order.

Definition at line 101 of file Kits.cpp.

Hoa2D::KitSources::~KitSources ( )

The sources kit destructor.

The sources kit destructor free the memory.

Definition at line 314 of file Kits.cpp.

Member Function Documentation

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

Retrieve the offset of the channels .

Retrieve the offset of the channels .

Returns
The offset of the channels .

Definition at line 207 of file Kits.h.

DecoderMulti::Mode Hoa2D::KitSources::getDecodingMode ( ) const
inline

Retrieve the decoding mode.

Retrieve the decoding mode.

Returns
The decoding mode.

Definition at line 174 of file Kits.h.

unsigned int Hoa2D::KitSources::getNumberOfChannels ( ) const
inline

Retrieve the number of channels.

Retrieve the number of channels of the planewave class.

Returns
The number of channels.

Definition at line 157 of file Kits.h.

unsigned int Hoa2D::KitSources::getNumberOfSources ( ) const
inline

Retrieve the number of sources.

Retrieve the number of sources.

Returns
The number of sources.

Definition at line 140 of file Kits.h.

Optim::Mode Hoa2D::KitSources::getOptimMode ( ) const
inline

Retrieve the optimization mode.

Retrieve the optimization mode.

Returns
The optimization mode.

Definition at line 190 of file Kits.h.

unsigned int Hoa2D::KitSources::getOrder ( ) const
inline

Retrieve the decomposition order.

Retrieve the decomposition order.

Returns
The order.

Definition at line 123 of file Kits.h.

unsigned int Hoa2D::KitSources::getSampleRate ( ) const
inline

Retrieve the sample rate.

Retrieve the sample rate.

Returns
The sample rate.

Definition at line 226 of file Kits.h.

unsigned int Hoa2D::KitSources::getVectorSize ( ) const
inline

Retrieve the vector size.

Retrieve vector size.

Returns
The vector size.

Definition at line 245 of file Kits.h.

void Hoa2D::KitSources::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 195 of file Kits.cpp.

void Hoa2D::KitSources::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 309 of file Kits.cpp.

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

Set the offset of the channels for the regular decoding.

Set the azimuth offset of the channels in radian for the regular decoding, if the decoding mode. The change will operate during the post process call to avoid conflicts during the process.

Parameters
offsetAn azimuth value.

Definition at line 165 of file Kits.cpp.

void Hoa2D::KitSources::setDecodingMode ( DecoderMulti::Mode  mode)

Set the decoding mode.

Set the decoding mode. The change will operate during the post process call to avoid conflicts during the process.

Parameters
modeThe decoding mode.

Definition at line 153 of file Kits.cpp.

void Hoa2D::KitSources::setNumberOfChannels ( unsigned int  numberOfChannels)

Set the number of channels.

Set the number of channels. The change will operate during the post process call to avoid conflicts during the process.

Parameters
numberOfChannelsThe number of channels.

Definition at line 143 of file Kits.cpp.

void Hoa2D::KitSources::setNumberOfSources ( unsigned int  numberOfSources)

Set the number of sources.

Set the number of sources. The change will operate during the post process call to avoid conflicts during the process.

Parameters
numberOfSourcesThe number of sources.

Definition at line 138 of file Kits.cpp.

void Hoa2D::KitSources::setOptimMode ( Optim::Mode  mode)

This method set the optimization mode.

The mode should be one of the 3 optimization modes, Basic, MaxRe or InPhase.

Parameters
modeThe optimization mode.

Definition at line 159 of file Kits.cpp.

void Hoa2D::KitSources::setOrder ( unsigned int  order)

Set the decomposition order.

Set the decomposition order. The change will operate during the post process call to avoid conflicts during the process.

Parameters
orderThe order.

Definition at line 132 of file Kits.cpp.

void Hoa2D::KitSources::setSampleRate ( unsigned int  sampleRate)

Set the sample rate.

Set the sample rate. The sample will change the impulse responses size and their sizes increase with it. The valid sample rate are 44100, 48000, 88200 and 9600. Setting the sample rate will load the impulse responses, it is essential to define it before the digital signal processing.

Parameters
sampleRateThe sample rate.
See Also
setVectorSize

Definition at line 170 of file Kits.cpp.

void Hoa2D::KitSources::setVectorSize ( unsigned int  vectorSize)

Set the vector size.

Set the vector size. Setting the sample size will allocate the vector to compute the binaural decoding.

Parameters
vectorSizeThe vector size.
See Also
setSampleRate

Definition at line 176 of file Kits.cpp.