vbap
0.0.1
The vector based amplitude panning
|
The single point precision part of the library. More...
Typedefs | |
typedef struct _vbapf | t_vbapf |
The opaque type used to compute vbap. | |
Functions | |
t_vbapf * | vbapf_new (void) |
Allocates a new vbap structure. More... | |
void | vbapf_free (t_vbapf *vbap) |
Frees a vbap structure. More... | |
size_t | vbapf_nls (t_vbapf const *vbap) |
Gets the current number of loudspeakers. More... | |
unsigned char | vbapf_dimension (t_vbapf const *vbap) |
Gets the current dimension. More... | |
char | vbapf_2d_prepare (t_vbapf *vbap, size_t const nls, float const *angles) |
Prepares the vbap structure for a specific 2d configuration. More... | |
void | vbapf_2d_perform (t_vbapf const *vbap, float const azimuth, float *gains) |
Computes the gains of the loudspeakers for a specified angle. More... | |
char | vbapf_3d_prepare (t_vbapf *vbap, size_t const nls, float const *angles) |
Prepares the vbap structure for a specific 3d configuration. More... | |
void | vbapf_3d_perform (t_vbapf const *vbap, float const azimuth, float const elevation, float *gains) |
Computes the gains of the loudspeakers for a specified angle. More... | |
The single point precision part of the library.
void vbapf_2d_perform | ( | t_vbapf const * | vbap, |
float const | azimuth, | ||
float * | gains | ||
) |
Computes the gains of the loudspeakers for a specified angle.
The function finds the best pair of loudspeakers depending on the azimuth of the
virtual source and computes the gains coeffcients of this loudspeakers. The vector of
gains must be at least the size of the number of loudspeakers.
vbap | The pointer to the vbap structure. |
azimuth | The azimuth of the virtual source. |
gains | The vector to fill with the gains of the loudspkeakers. |
char vbapf_2d_prepare | ( | t_vbapf * | vbap, |
size_t const | nls, | ||
float const * | angles | ||
) |
Prepares the vbap structure for a specific 2d configuration.
The function finds the functional pairs of loudspeakers and computes their
matrices. The function expects a vector of angles in degrees that defines the azimuth of
the loudspkeakers.
vbap | The pointer to the vbap structure. |
nls | The number of loudspeakers. |
angles | The angles of the loudspeakers. |
void vbapf_3d_perform | ( | t_vbapf const * | vbap, |
float const | azimuth, | ||
float const | elevation, | ||
float * | gains | ||
) |
Computes the gains of the loudspeakers for a specified angle.
The function finds the best triplet of loudspeakers depending on the azimuth of
the virtual source and computes the gains coeffcients of this loudspeakers. The vector of
gains must be at least the size of the number of loudspeakers.
vbap | The pointer to the vbap structure. |
azimuth | The azimuth of the virtual source. |
elevation | The elevation of the virtual source. |
gains | The vector to fill with the gains of the loudspkeakers. |
char vbapf_3d_prepare | ( | t_vbapf * | vbap, |
size_t const | nls, | ||
float const * | angles | ||
) |
Prepares the vbap structure for a specific 3d configuration.
The function finds the functional triplets of loudspeakers and computes their
matrices. The function expects a vector of pair of angles in degrees that defines the
azimuth and the elevation of the loudspkeakers.
vbap | The pointer to the vbap structure. |
nls | The number of loudspeakers. |
angles | The angles of the loudspeakers. |
unsigned char vbapf_dimension | ( | t_vbapf const * | vbap | ) |
Gets the current dimension.
The dimension can be 0 if the vbap structure has not been prepared yet, 2 if the
the vbap structure has been prepared for a 2 dimensional application and 3 if thee vbap
structure has been prepared for a 2 dimensional application.
vbap | The pointer to the vbap structure. |
void vbapf_free | ( | t_vbapf * | vbap | ) |
Frees a vbap structure.
The function frees a vbap structure. For convenience, the pointer is verified so
it can be NULL without generating any error.
vbap | The pointer to the vbap structure to free. |
t_vbapf* vbapf_new | ( | void | ) |
Allocates a new vbap structure.
The function allocates and initializes a vbap structure that can be used for both
2d and 3d applications.
size_t vbapf_nls | ( | t_vbapf const * | vbap | ) |
Gets the current number of loudspeakers.
vbap | The pointer to the vbap structure. |