Allolib  1.0
C++ Components For Interactive Multimedia
al::AmbiBase Class Reference

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/sound/al_Ambisonics.hpp>

Inheritance diagram for al::AmbiBase:
al::AmbiDecode al::AmbiEncode

Public Member Functions

 AmbiBase (int dim, int order)
 
int dim () const
 Get number dimensions.
 
int order () const
 Get order.
 
const float * weights () const
 Get Ambisonic channel weights.
 
int channels () const
 Returns total number of Ambisonic domain (B-format) channels.
 
void dim (int dim)
 Set the number of dimensions.
 
void order (int order)
 Set the order.
 
virtual void onChannelsChange ()
 Called whenever the number of Ambisonic channels changes.
 

Static Public Member Functions

static int channelsToUniformOrder (int channels)
 
static void encodeWeightsFuMa (float *weights, int dim, int order, float azimuth, float elevation)
 
static void encodeWeightsFuMa (float *ws, int dim, int order, float x, float y, float z)
 
static void encodeWeightsFuMa16 (float *weights, float azimuth, float elevation)
 Brute force 3rd order. Weights must be of size 16.
 
static void encodeWeightsFuMa16 (float *ws, float x, float y, float z)
 (x,y,z unit vector in the listener's coordinate frame)
 
static int orderToChannels (int dim, int order)
 
static int orderToChannelsH (int orderH)
 
static int orderToChannelsV (int orderV)
 
static int channelsToOrder (int channels)
 
static int channelsToDimensions (int channels)
 

Static Protected Member Functions

template<typename T >
static void resize (T *&a, int n)
 

Protected Attributes

int mDim
 
int mOrder
 
int mChannels
 
float * mWeights
 

Detailed Description

Ambisonic base class

Definition at line 114 of file al_Ambisonics.hpp.

Constructor & Destructor Documentation

◆ AmbiBase()

al::AmbiBase::AmbiBase ( int  dim,
int  order 
)
Parameters
[in]dimnumber of spatial dimensions (2 or 3)
[in]orderhighest spherical harmonic order

Member Function Documentation

◆ encodeWeightsFuMa() [1/2]

static void al::AmbiBase::encodeWeightsFuMa ( float *  weights,
int  dim,
int  order,
float  azimuth,
float  elevation 
)
static

Compute spherical harmonic weights based on azimuth and elevation azimuth is anti-clockwise; both azimuth and elevation are in degrees

◆ encodeWeightsFuMa() [2/2]

static void al::AmbiBase::encodeWeightsFuMa ( float *  ws,
int  dim,
int  order,
float  x,
float  y,
float  z 
)
static

Compute spherical harmonic weights based on unit direction vector (in the listener's coordinate frame)


The documentation for this class was generated from the following file: