SAF
|
A frequency-dependent Ambisonic decoder for reproducing Ambisonic sound scenes over loudspeakers. More...
#include "ambi_dec_internal.h"
Go to the source code of this file.
Functions | |
void | ambi_dec_setCodecStatus (void *const hAmbi, CODEC_STATUS newStatus) |
Sets codec status (see CODEC_STATUS enum) | |
void | ambi_dec_interpHRTFs (void *const hAmbi, float azimuth_deg, float elevation_deg, float_complex h_intrp[HYBRID_BANDS][NUM_EARS]) |
Interpolates between the 3 nearest HRTFs using amplitude-preserving VBAP gains. | |
void | loadLoudspeakerArrayPreset (LOUDSPEAKER_ARRAY_PRESETS preset, float dirs_deg[MAX_NUM_LOUDSPEAKERS][2], int *newNCH, int *nDims) |
Returns the loudspeaker directions for a specified loudspeaker array preset. | |
A frequency-dependent Ambisonic decoder for reproducing Ambisonic sound scenes over loudspeakers.
Different decoder settings can be specified for the low and high frequencies. A number of decoding options are also offered, including [1,2]. When utilising spherical harmonic signals derived from real microphone arrays, this implementation also allows the decoding order to be specified per frequency band; of course, this may also be used creatively. An optional, loudspeaker channel binauraliser is included, along with with SOFA file loading, for headphone listening.
The algorithms utilised in this Ambisonic decoder were pieced together and developed in collaboration with Archontis Politis.
Definition in file ambi_dec_internal.c.
void ambi_dec_interpHRTFs | ( | void *const | hAmbi, |
float | azimuth_deg, | ||
float | elevation_deg, | ||
float_complex | h_intrp[HYBRID_BANDS][NUM_EARS] ) |
Interpolates between the 3 nearest HRTFs using amplitude-preserving VBAP gains.
The HRTF magnitude responses and HRIR ITDs are interpolated seperately before being re-combined.
[in] | hAmbi | ambi_dec handle |
[in] | azimuth_deg | Interpolation direction azimuth in DEGREES |
[in] | elevation_deg | Interpolation direction elevation in DEGREES |
[out] | h_intrp | Interpolated HRTF |
Definition at line 59 of file ambi_dec_internal.c.
void ambi_dec_setCodecStatus | ( | void *const | hAmbi, |
CODEC_STATUS | newStatus ) |
Sets codec status (see CODEC_STATUS enum)
Definition at line 48 of file ambi_dec_internal.c.
void loadLoudspeakerArrayPreset | ( | LOUDSPEAKER_ARRAY_PRESETS | preset, |
float | dirs_deg[MAX_NUM_LOUDSPEAKERS][2], | ||
int * | nCH, | ||
int * | nDims ) |
Returns the loudspeaker directions for a specified loudspeaker array preset.
The function also returns the number of loudspeakers in the array, and a crude estimate of whether it is 2D or 3D (based on whether the sum of the absolute loudspeaker elevation angle is not zero). Note: 2-D setups which are not on the horizontal plane (i.e. all elevations==0) will be registered as a 3-D setup. Further Note: default uniformly distributed points are used to pad the dirs_deg matrix up to the MAX_NUM_LOUDSPEAKERS, if nCH is less than this. This can help avoid scenarios of many sources being panned in the same direction, or triangulations errors.
[in] | preset | See LOUDSPEAKER_ARRAY_PRESETS enum |
[out] | dirs_deg | Loudspeaker directions, [azimuth elevation] convention, in DEGREES; |
[out] | nCH | (&) number of loudspeaker directions in the array |
[out] | nDims | (&) number of dimensions (2 or 3) |
Definition at line 117 of file ambi_dec_internal.c.