SAF
|
An arbitrary array panner (HRIRs, microphone array IRs, etc.) with coherent and incoherent spreading modes, as described in [1]. More...
#include "spreader_internal.h"
Go to the source code of this file.
Functions | |
void | spreader_create (void **const phSpr) |
Creates an instance of the spreader. | |
void | spreader_destroy (void **const phSpr) |
Destroys an instance of the spreader. | |
void | spreader_init (void *const hSpr, int sampleRate) |
Initialises an instance of spreader with default settings. | |
void | spreader_initCodec (void *const hSpr) |
Intialises the codec variables, based on current global/user parameters. | |
void | spreader_process (void *const hSpr, const float *const *inputs, float *const *const outputs, int nInputs, int nOutputs, int nSamples) |
Spatialises and spreads the input signals in the user specified directions. | |
void | spreader_refreshSettings (void *const hSpr) |
Sets all intialisation flags to 1; re-initialising all settings/variables as spreader is currently configured, at next available opportunity. | |
void | spreader_setSpreadingMode (void *const hSpr, int newMode) |
Sets the spreading mode (see SPREADER_PROC_MODES) | |
void | spreader_setAveragingCoeff (void *const hSpr, float newValue) |
Sets the averaging coefficient [0..1]. | |
void | spreader_setSourceAzi_deg (void *const hSpr, int index, float newAzi_deg) |
Sets the panning azimuth for a specific channel index, in DEGREES. | |
void | spreader_setSourceElev_deg (void *const hSpr, int index, float newElev_deg) |
Sets the panning elevation for a specific channel index, in DEGREES. | |
void | spreader_setSourceSpread_deg (void *const hSpr, int index, float newSpread_deg) |
Sets the source spread for a specific channel index, in DEGREES. | |
void | spreader_setNumSources (void *const hSpr, int new_nSources) |
Sets the number of input channels/sources to binauralise. | |
void | spreader_setUseDefaultHRIRsflag (void *const hSpr, int newState) |
Sets flag to dictate whether the default HRIRs in the Spatial_Audio_Framework should be used (1), or a custom HRIR set loaded via a SOFA file (0). | |
void | spreader_setSofaFilePath (void *const hSpr, const char *path) |
Sets the file path for a .sofa file, in order to employ a custom HRIR set for the decoding. | |
int | spreader_getFrameSize (void) |
Returns the processing framesize (i.e., number of samples processed with every _process() call ) | |
CODEC_STATUS | spreader_getCodecStatus (void *const hSpr) |
Returns current codec status codec status (see CODEC_STATUS enum) | |
float | spreader_getProgressBar0_1 (void *const hSpr) |
(Optional) Returns current intialisation/processing progress, between 0..1 | |
void | spreader_getProgressBarText (void *const hSpr, char *text) |
(Optional) Returns current intialisation/processing progress text | |
int * | spreader_getDirectionActivePtr (void *const hSpr, int index) |
Returns the pointer to a vector describing which directions are currently being used for the spreading, for a given source index. | |
int | spreader_getSpreadingMode (void *const hSpr) |
Returns the spreading mode (see SPREADER_PROC_MODES) | |
float | spreader_getAveragingCoeff (void *const hSpr) |
Returns the averaging coefficient [0..1]. | |
float | spreader_getSourceAzi_deg (void *const hSpr, int index) |
Returns the source azimuth for a given source index, in DEGREES. | |
float | spreader_getSourceElev_deg (void *const hSpr, int index) |
Returns the source elevation for a given source index, in DEGREES. | |
float | spreader_getSourceSpread_deg (void *const hSpr, int index) |
Returns the source spread for a given source index, in DEGREES. | |
int | spreader_getNumSources (void *const hSpr) |
Returns the number of inputs/sources in the current config. | |
int | spreader_getMaxNumSources () |
Returns the maximum number of input sources supported by spreader. | |
int | spreader_getNumOutputs (void *const hSpr) |
Returns the number of ears possessed by the average homo sapien. | |
int | spreader_getNDirs (void *const hSpr) |
Returns the number of directions in the currently used HRIR set. | |
float | spreader_getIRAzi_deg (void *const hSpr, int index) |
Returns the IR/TF azimuth for a given index, in DEGREES. | |
float | spreader_getIRElev_deg (void *const hSpr, int index) |
Returns the IR/TF elevation for a given index, in DEGREES. | |
int | spreader_getIRlength (void *const hSpr) |
Returns the length of IRs in time-domain samples. | |
int | spreader_getIRsamplerate (void *const hSpr) |
Returns the IR sample rate. | |
int | spreader_getUseDefaultHRIRsflag (void *const hSpr) |
Returns the value of a flag used to dictate whether the default HRIRs in the Spatial_Audio_Framework should be used (1), or a custom HRIR set loaded via a SOFA file (0). | |
char * | spreader_getSofaFilePath (void *const hSpr) |
Returns the file path for a .sofa file. | |
int | spreader_getDAWsamplerate (void *const hSpr) |
Returns the DAW/Host sample rate. | |
int | spreader_getProcessingDelay () |
Returns the processing delay in samples (may be used for delay compensation purposes) | |
An arbitrary array panner (HRIRs, microphone array IRs, etc.) with coherent and incoherent spreading modes, as described in [1].
Definition in file spreader.c.
void spreader_create | ( | void **const | phSpr | ) |
Creates an instance of the spreader.
[in] | phSpr | (&) address of spreader handle |
Definition at line 34 of file spreader.c.
void spreader_destroy | ( | void **const | phSpr | ) |
Destroys an instance of the spreader.
[in] | phSpr | (&) address of spreader handle |
Definition at line 119 of file spreader.c.
float spreader_getAveragingCoeff | ( | void *const | hSpr | ) |
Returns the averaging coefficient [0..1].
Definition at line 806 of file spreader.c.
CODEC_STATUS spreader_getCodecStatus | ( | void *const | hSpr | ) |
Returns current codec status codec status (see CODEC_STATUS enum)
Definition at line 776 of file spreader.c.
int spreader_getDAWsamplerate | ( | void *const | hSpr | ) |
Returns the DAW/Host sample rate.
Definition at line 902 of file spreader.c.
int * spreader_getDirectionActivePtr | ( | void *const | hSpr, |
int | index ) |
Returns the pointer to a vector describing which directions are currently being used for the spreading, for a given source index.
Definition at line 794 of file spreader.c.
int spreader_getFrameSize | ( | void | ) |
Returns the processing framesize (i.e., number of samples processed with every _process() call )
Definition at line 771 of file spreader.c.
float spreader_getIRAzi_deg | ( | void *const | hSpr, |
int | index ) |
Returns the IR/TF azimuth for a given index, in DEGREES.
Definition at line 856 of file spreader.c.
float spreader_getIRElev_deg | ( | void *const | hSpr, |
int | index ) |
Returns the IR/TF elevation for a given index, in DEGREES.
Definition at line 865 of file spreader.c.
int spreader_getIRlength | ( | void *const | hSpr | ) |
Returns the length of IRs in time-domain samples.
Definition at line 874 of file spreader.c.
int spreader_getIRsamplerate | ( | void *const | hSpr | ) |
Returns the IR sample rate.
Definition at line 880 of file spreader.c.
int spreader_getMaxNumSources | ( | void | ) |
Returns the maximum number of input sources supported by spreader.
Definition at line 839 of file spreader.c.
int spreader_getNDirs | ( | void *const | hSpr | ) |
Returns the number of directions in the currently used HRIR set.
Definition at line 850 of file spreader.c.
int spreader_getNumOutputs | ( | void *const | hSpr | ) |
Returns the number of ears possessed by the average homo sapien.
Definition at line 844 of file spreader.c.
int spreader_getNumSources | ( | void *const | hSpr | ) |
Returns the number of inputs/sources in the current config.
Definition at line 833 of file spreader.c.
int spreader_getProcessingDelay | ( | void | ) |
Returns the processing delay in samples (may be used for delay compensation purposes)
Definition at line 908 of file spreader.c.
float spreader_getProgressBar0_1 | ( | void *const | hSpr | ) |
(Optional) Returns current intialisation/processing progress, between 0..1
Definition at line 782 of file spreader.c.
void spreader_getProgressBarText | ( | void *const | hSpr, |
char * | text ) |
(Optional) Returns current intialisation/processing progress text
Definition at line 788 of file spreader.c.
char * spreader_getSofaFilePath | ( | void *const | hSpr | ) |
Returns the file path for a .sofa file.
[in] | hSpr | spreader handle |
Definition at line 892 of file spreader.c.
float spreader_getSourceAzi_deg | ( | void *const | hSpr, |
int | index ) |
Returns the source azimuth for a given source index, in DEGREES.
Definition at line 812 of file spreader.c.
float spreader_getSourceElev_deg | ( | void *const | hSpr, |
int | index ) |
Returns the source elevation for a given source index, in DEGREES.
Definition at line 819 of file spreader.c.
float spreader_getSourceSpread_deg | ( | void *const | hSpr, |
int | index ) |
Returns the source spread for a given source index, in DEGREES.
Definition at line 826 of file spreader.c.
int spreader_getSpreadingMode | ( | void *const | hSpr | ) |
Returns the spreading mode (see SPREADER_PROC_MODES)
Definition at line 800 of file spreader.c.
int spreader_getUseDefaultHRIRsflag | ( | void *const | hSpr | ) |
Returns the value of a flag used to dictate whether the default HRIRs in the Spatial_Audio_Framework should be used (1), or a custom HRIR set loaded via a SOFA file (0).
Definition at line 886 of file spreader.c.
void spreader_init | ( | void *const | hSpr, |
int | samplerate ) |
Initialises an instance of spreader with default settings.
[in] | hSpr | spreader handle |
[in] | samplerate | Host samplerate. |
Definition at line 194 of file spreader.c.
void spreader_initCodec | ( | void *const | hSpr | ) |
Intialises the codec variables, based on current global/user parameters.
[in] | hSpr | spreader handle |
Definition at line 207 of file spreader.c.
void spreader_process | ( | void *const | hSpr, |
const float *const * | inputs, | ||
float *const * | outputs, | ||
int | nInputs, | ||
int | nOutputs, | ||
int | nSamples ) |
Spatialises and spreads the input signals in the user specified directions.
[in] | hSpr | spreader handle |
[in] | inputs | Input channel buffers; 2-D array: nInputs x nSamples |
[in] | outputs | Output channel buffers; 2-D array: nOutputs x nSamples |
[in] | nInputs | Number of input channels |
[in] | nOutputs | Number of output channels |
[in] | nSamples | Number of samples in 'inputs'/'output' matrices |
Definition at line 360 of file spreader.c.
void spreader_refreshSettings | ( | void *const | hSpr | ) |
Sets all intialisation flags to 1; re-initialising all settings/variables as spreader is currently configured, at next available opportunity.
Definition at line 692 of file spreader.c.
void spreader_setAveragingCoeff | ( | void *const | hSpr, |
float | newValue ) |
Sets the averaging coefficient [0..1].
Definition at line 704 of file spreader.c.
void spreader_setNumSources | ( | void *const | hSpr, |
int | new_nSources ) |
Sets the number of input channels/sources to binauralise.
Definition at line 742 of file spreader.c.
void spreader_setSofaFilePath | ( | void *const | hSpr, |
const char * | path ) |
Sets the file path for a .sofa file, in order to employ a custom HRIR set for the decoding.
[in] | hSpr | spreader handle |
[in] | path | File path to .sofa file (WITH file extension) |
Definition at line 758 of file spreader.c.
void spreader_setSourceAzi_deg | ( | void *const | hSpr, |
int | index, | ||
float | newAzi_deg ) |
Sets the panning azimuth for a specific channel index, in DEGREES.
Definition at line 710 of file spreader.c.
void spreader_setSourceElev_deg | ( | void *const | hSpr, |
int | index, | ||
float | newElev_deg ) |
Sets the panning elevation for a specific channel index, in DEGREES.
Definition at line 722 of file spreader.c.
void spreader_setSourceSpread_deg | ( | void *const | hSpr, |
int | index, | ||
float | newSpread_deg ) |
Sets the source spread for a specific channel index, in DEGREES.
Definition at line 732 of file spreader.c.
void spreader_setSpreadingMode | ( | void *const | hSpr, |
int | newMode ) |
Sets the spreading mode (see SPREADER_PROC_MODES)
Definition at line 697 of file spreader.c.
void spreader_setUseDefaultHRIRsflag | ( | void *const | hSpr, |
int | newState ) |
Sets flag to dictate whether the default HRIRs in the Spatial_Audio_Framework should be used (1), or a custom HRIR set loaded via a SOFA file (0).
Definition at line 749 of file spreader.c.