SAF
|
Convolves input audio (up to 64 channels) with interpolated HRTFs in the time-frequency domain. More...
#include "binauraliser_internal.h"
Go to the source code of this file.
Functions | |
void | binauraliser_setCodecStatus (void *const hBin, CODEC_STATUS newStatus) |
Sets codec status (see CODEC_STATUS enum) | |
void | binauraliser_interpHRTFs (void *const hBin, INTERP_MODES mode, float azimuth_deg, float elevation_deg, float_complex h_intrp[HYBRID_BANDS][NUM_EARS]) |
Interpolates between (up to) 3 HRTFs via amplitude-normalised VBAP gains. | |
void | binauraliser_initHRTFsAndGainTables (void *const hBin) |
Initialise the HRTFs: either loading the default set or loading from a SOFA file; and then generate a VBAP gain table for interpolation. | |
void | binauraliser_initTFT (void *const hBin) |
Initialise the filterbank used by binauraliser. | |
void | binauraliser_loadPreset (SOURCE_CONFIG_PRESETS preset, float dirs_deg[MAX_NUM_INPUTS][2], int *newNCH, int *nDims) |
Returns the source directions for a specified source config preset. | |
Convolves input audio (up to 64 channels) with interpolated HRTFs in the time-frequency domain.
The HRTFs are interpolated by applying amplitude-preserving VBAP gains to the HRTF magnitude responses and inter-aural time differences (ITDs) individually, before being re-combined. The example also allows the user to specify an external SOFA file for the convolution, and rotations of the source directions to accomodate head-tracking.
Definition in file binauraliser_internal.c.
void binauraliser_initHRTFsAndGainTables | ( | void *const | hBin | ) |
Initialise the HRTFs: either loading the default set or loading from a SOFA file; and then generate a VBAP gain table for interpolation.
Definition at line 125 of file binauraliser_internal.c.
void binauraliser_initTFT | ( | void *const | hBin | ) |
Initialise the filterbank used by binauraliser.
Definition at line 267 of file binauraliser_internal.c.
void binauraliser_interpHRTFs | ( | void *const | hBin, |
INTERP_MODES | mode, | ||
float | azimuth_deg, | ||
float | elevation_deg, | ||
float_complex | h_intrp[HYBRID_BANDS][NUM_EARS] ) |
Interpolates between (up to) 3 HRTFs via amplitude-normalised VBAP gains.
The HRTF magnitude responses and HRIR ITDs are interpolated seperately before re-introducing the phase.
[in] | hBin | binauraliser handle |
[in] | mode | see INTERP_MODES |
[in] | azimuth_deg | Source azimuth in DEGREES |
[in] | elevation_deg | Source elevation in DEGREES |
[out] | h_intrp | Interpolated HRTF |
Definition at line 46 of file binauraliser_internal.c.
void binauraliser_loadPreset | ( | SOURCE_CONFIG_PRESETS | preset, |
float | dirs_deg[MAX_NUM_INPUTS][2], | ||
int * | newNCH, | ||
int * | nDims ) |
Returns the source directions for a specified source config preset.
The function also returns the number of source in the configuration Note: default uniformly distributed points are used to pad the dirs_deg matrix up to the MAX_NUM_INPUTS, 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 SOURCE_CONFIG_PRESETS enum. |
[out] | dirs_deg | Source directions, [azimuth elevation] convention, in DEGREES; |
[out] | newNCH | (&) new number of channels |
[out] | nDims | (&) estimate of the number of dimensions (2 or 3) |
Definition at line 283 of file binauraliser_internal.c.
void binauraliser_setCodecStatus | ( | void *const | hBin, |
CODEC_STATUS | newStatus ) |
Sets codec status (see CODEC_STATUS enum)
Definition at line 35 of file binauraliser_internal.c.