Convolves input audio (up to 64 channels) with interpolated HRTFs in the time-frequency domain.
Convolves input audio (up to 64 channels) with interpolated HRTFs in the time-frequency domain.
#ifndef __BINAURALISER_H_INCLUDED__
#define __BINAURALISER_H_INCLUDED__
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
int samplerate);
const float *const * inputs,
float* const* outputs,
int nInputs,
int nOutputs,
int nSamples);
int index,
float newAzi_deg);
int index,
float newElev_deg);
#ifdef __cplusplus
}
#endif
#endif
A bunch of things that are common to many of the saf examples.
CODEC_STATUS
Current status of the codec.
int binauraliser_getNTriangles(void *const hBin)
Returns the number of triangular groupings (faces) returned by the Convex Hull.
void binauraliser_setSofaFilePath(void *const hBin, const char *path)
Sets the file path for a .sofa file, in order to employ a custom HRIR set for the decoding.
void binauraliser_refreshSettings(void *const hBin)
Sets all intialisation flags to 1; re-initialising all settings/variables as binauraliser is currentl...
char * binauraliser_getSofaFilePath(void *const hBin)
Returns the file path for a .sofa file.
void binauraliser_setEnableHRIRsDiffuseEQ(void *const hBin, int newState)
Enable (1) or disable (0) the diffuse-field EQ applied to the HRTFs.
int binauraliser_getFlipPitch(void *const hBin)
Returns a flag as to whether to "flip" the sign of the current 'pitch' angle (0: do not flip sign,...
int binauraliser_getNDirs(void *const hBin)
Returns the number of directions in the currently used HRIR set.
void binauraliser_process(void *const hBin, const float *const *inputs, float *const *outputs, int nInputs, int nOutputs, int nSamples)
Binauralises the input signals at the user specified directions.
void binauraliser_destroy(void **const phBin)
Destroys an instance of the binauraliser.
int binauraliser_getUseDefaultHRIRsflag(void *const hBin)
Returns the value of a flag used to dictate whether the default HRIRs in the Spatial_Audio_Framework ...
void binauraliser_setRoll(void *const hBin, float newRoll)
Sets the 'roll' rotation angle, in DEGREES.
void binauraliser_initCodec(void *const hBin)
Intialises the codec variables, based on current global/user parameters.
int binauraliser_getFlipRoll(void *const hBin)
Returns a flag as to whether to "flip" the sign of the current 'roll' angle (0: do not flip sign,...
void binauraliser_setSourceAzi_deg(void *const hBin, int index, float newAzi_deg)
Sets the panning azimuth for a specific channel index, in DEGREES.
void binauraliser_setPitch(void *const hBin, float newPitch)
Sets the 'pitch' rotation angle, in DEGREES.
void binauraliser_setSourceGain(void *const hBin, int srcIdx, float newGain)
Sets gain factor for an input source.
int binauraliser_getEnableHRIRsDiffuseEQ(void *const hBin)
Returns the flag indicating whether the diffuse-field EQ applied to the HRTFs is enabled (1) or disab...
void binauraliser_setSourceElev_deg(void *const hBin, int index, float newElev_deg)
Sets the panning elevation for a specific channel index, in DEGREES.
void binauraliser_init(void *const hBin, int samplerate)
Initialises an instance of binauraliser with default settings.
float binauraliser_getProgressBar0_1(void *const hBin)
(Optional) Returns current intialisation/processing progress, between 0..1
INTERP_MODES
Available interpolation modes.
@ INTERP_TRI
Triangular interpolation.
@ INTERP_TRI_PS
Triangular interpolation (with phase-simplification)
CODEC_STATUS binauraliser_getCodecStatus(void *const hBin)
Returns current codec status codec status (see CODEC_STATUS enum)
int binauraliser_getMaxNumSources(void)
Returns the maximum number of input sources supported by binauraliser.
void binauraliser_create(void **const phBin)
Creates an instance of the binauraliser.
int binauraliser_getRPYflag(void *const hBin)
Returns a flag as to whether to use "yaw-pitch-roll" (0) or "roll-pitch-yaw" (1) rotation order.
float binauraliser_getPitch(void *const hBin)
Returns the 'pitch' rotation angle, in DEGREES.
int binauraliser_getFrameSize(void)
Returns the processing framesize (i.e., number of samples processed with every _process() call )
int binauraliser_getEnableRotation(void *const hBin)
Returns the flag value which dictates whether to enable/disable sound-field rotation (0: disabled,...
void binauraliser_setRPYflag(void *const hBin, int newState)
Sets a flag as to whether to use "yaw-pitch-roll" (0) or "roll-pitch-yaw" (1) rotation order.
int binauraliser_getNumEars(void)
Returns the number of ears possessed by the average homo sapien.
void binauraliser_getProgressBarText(void *const hBin, char *text)
(Optional) Returns current intialisation/processing progress text
int binauraliser_getProcessingDelay(void)
Returns the processing delay in samples (may be used for delay compensation purposes)
int binauraliser_getDAWsamplerate(void *const hBin)
Returns the DAW/Host sample rate.
int binauraliser_getHRIRsamplerate(void *const hBin)
Returns the HRIR sample rate.
float binauraliser_getYaw(void *const hBin)
Returns the 'yaw' rotation angle, in DEGREES.
float binauraliser_getSourceElev_deg(void *const hBin, int index)
Returns the source elevation for a given index, in DEGREES.
void binauraliser_setFlipPitch(void *const hBin, int newState)
Sets a flag as to whether to "flip" the sign of the current 'pitch' angle (0: do not flip sign,...
void binauraliser_setEnableRotation(void *const hBin, int newState)
Sets the flag to enable/disable (1 or 0) rotation.
void binauraliser_setFlipYaw(void *const hBin, int newState)
Sets a flag as to whether to "flip" the sign of the current 'yaw' angle (0: do not flip sign,...
void binauraliser_setYaw(void *const hBin, float newYaw)
Sets the 'yaw' rotation angle, in DEGREES.
void binauraliser_setInputConfigPreset(void *const hBin, int newPresetID)
Loads an input preset (see SOURCE_CONFIG_PRESETS enum)
void binauraliser_setInterpMode(void *const hBin, int newMode)
NOT IMPLEMENTED YET.
void binauraliser_setUseDefaultHRIRsflag(void *const hBin, int newState)
Sets flag to dictate whether the default HRIRs in the Spatial_Audio_Framework should be used (1),...
void binauraliser_setUnSolo(void *const hBin)
Unsolo / unmute all sources.
float binauraliser_getHRIRElev_deg(void *const hBin, int index)
Returns the HRIR/HRTF elevation for a given index, in DEGREES.
float binauraliser_getSourceAzi_deg(void *const hBin, int index)
Returns the source azimuth for a given index, in DEGREES.
float binauraliser_getRoll(void *const hBin)
Returns the 'roll' rotation angle, in DEGREES.
void binauraliser_setFlipRoll(void *const hBin, int newState)
Sets a flag as to whether to "flip" the sign of the current 'roll' angle (0: do not flip sign,...
int binauraliser_getFlipYaw(void *const hBin)
Returns a flag as to whether to "flip" the sign of the current 'yaw' angle (0: do not flip sign,...
int binauraliser_getInterpMode(void *const hBin)
NOT IMPLEMENTED YET.
int binauraliser_getHRIRlength(void *const hBin)
Returns the length of HRIRs in time-domain samples.
float binauraliser_getHRIRAzi_deg(void *const hBin, int index)
Returns the HRIR/HRTF azimuth for a given index, in DEGREES.
void binauraliser_setSourceSolo(void *const hBin, int srcIdx)
Set a source to solo.
void binauraliser_setNumSources(void *const hBin, int new_nSources)
Sets the number of input channels/sources to binauralise.
int binauraliser_getNumSources(void *const hBin)
Returns the number of inputs/sources in the current layout.