40 *phSpr = (
void*)pData;
71 pData->
HHH[band] = NULL;
78 pData->
Cy[src] = NULL;
139 if(pData->
hSTFT !=NULL)
152 free(pData->
HHH[band]);
159 free(pData->
Cy[src]);
172 free(pData->_tmpFrame);
178 free(pData->_Cproto);
206 pData->
fs = sampleRate;
219 int q, band, ng, nSources, src;
220 float_complex scaleC;
221#ifdef SAF_ENABLE_SOFA_READER_MODULE
227 const float_complex calpha = cmplxf(1.0f, 0.0f), cbeta = cmplxf(0.0f, 0.0f);
246#ifndef SAF_ENABLE_SOFA_READER_MODULE
260#ifdef SAF_ENABLE_SOFA_READER_MODULE
267 saf_print_warning(
"Unable to load the specified SOFA file. Using default HRIR data instead");
284 if(pData->
h_fs!=pData->
fs){
287 float* h_grid_resampled;
288 int h_length_resample;
293 pData->
h_len = h_length_resample;
298 free(h_grid_resampled);
309 int orders[4] = {20, 15, 6, 6};
311 float freqCutoffs[4] = {900.0f, 6.8e3f, 12e3f, 24e3f};
312 const int maxDelay = 12;
315 latticeDecorrelator_create(&(pData->
hDecor[src]), (
float)pData->
fs,
HOP_SIZE, pData->
freqVector,
HYBRID_BANDS, pData->
Q, orders, freqCutoffs, 4, maxDelay, 0, 0.75f);
325 pData->
HHH[band] = (float_complex**)
realloc2d((
void**)pData->
HHH[band], pData->
nGrid, pData->
Q * (pData->
Q),
sizeof(float_complex));
326 for(ng=0; ng<pData->
nGrid; ng++){
327 for(q=0; q<pData->
Q; q++)
329 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasConjTrans, pData->
Q, pData->
Q, 1, &calpha,
332 pData->
HHH[band][ng], pData->
Q);
333 scaleC = cmplxf(pData->
weights[ng], 0.0f);
334 cblas_cscal(pData->
Q * (pData->
Q), &scaleC, pData->
HHH[band][ng], 1);
345 memset(pData->
Qmix, 0, pData->
Q*(pData->
Q)*
sizeof(
float));
347 memset(pData->
Qmix_cmplx, 0, pData->
Q*(pData->
Q)*
sizeof(float_complex));
348 for(q=0; q<pData->
Q; q++){
349 pData->
Qmix[q*(pData->
Q)+q] = 1.0f;
350 pData->
Qmix_cmplx[q*(pData->
Q)+q] = cmplxf(1.0f, 0.0f);
373 memset(pData->
interp_Mr_cmplx, 0, (pData->
Q)*(pData->
Q) *
sizeof(float_complex));
388 const float *
const * inputs,
389 float*
const*
const outputs,
396 int q, src, ng, ch, i, j, band, t, nSources, Q, centre_ind, nSpread;
397 float trace, Ey, Eproto, Gcomp;
399 float_complex scaleC, tmp;
405 const float_complex calpha = cmplxf(1.0f, 0.0f), cbeta = cmplxf(0.0f, 0.0f);
411 for(i=0; i<nSources; i++){
422 for(i=0; i <
SAF_MIN(nSources,nInputs); i++)
424 for(; i<nSources; i++)
435 for(src=0; src<nSources; src++){
438 cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, pData->
nGrid, 1, 3, 1.0f,
440 src_dir_xyz, 1, 0.0f,
442 for(i=0; i<pData->
nGrid; i++)
453 memset(pData->_H_tmp, 0, Q*
sizeof(float_complex));
454 for(ng=0,nSpread=0; ng<pData->
nGrid; ng++){
455 if(pData->
angles[ng] <= (src_spread[src]/2.0f)){
457 pData->_H_tmp[q] = ccaddf(pData->_H_tmp[q], pData->
H_grid[band*Q*pData->
nGrid + q*pData->
nGrid + ng]);
471 pData->_H_tmp[q] = pData->
H_grid[band*Q*pData->
nGrid + q*pData->
nGrid + centre_ind];
476 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, Q,
TIME_SLOTS, 1, &calpha,
490 H_tmp[q] = pData->
H_grid[band*Q*pData->
nGrid + q*pData->
nGrid + centre_ind];
491 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, Q,
TIME_SLOTS, 1, &calpha,
519 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasConjTrans, Q, Q,
TIME_SLOTS, &calpha,
524 cblas_saxpy(2*Q*Q, 1.0f-pData->
covAvgCoeff, (
float*)pData->_Cproto, 1, (
float*)pData->
Cproto[src][band], 1);
531 memset(pData->_Cy, 0, Q*Q*
sizeof(float_complex));
532 memset(pData->_H_tmp, 0, Q*
sizeof(float_complex));
533 for(ng=0, nSpread=0; ng<pData->
nGrid; ng++){
534 if(pData->
angles[ng] <= (src_spread[src]/2.0f)){
535 cblas_caxpy(Q*Q, &calpha, pData->
HHH[band][ng], 1, pData->_Cy, 1);
537 pData->_H_tmp[q] = ccaddf(pData->_H_tmp[q], pData->
H_grid[band*Q*pData->
nGrid + q*pData->
nGrid + ng]);
550 cblas_caxpy(Q*Q, &calpha, pData->
HHH[band][centre_ind], 1, pData->_Cy, 1);
552 pData->_H_tmp[q] = pData->
H_grid[band*Q*pData->
nGrid + q*pData->
nGrid + centre_ind];
561 trace += crealf(pData->_Cy[q*Q+q]);
562 cblas_sscal(2*Q*Q, 1.0f/(trace+2.23e-9f), (
float*)pData->_Cy, 1);
566 pData->_H_tmp[q] = pData->
H_grid[band*Q*pData->
nGrid + q*pData->
nGrid + centre_ind];
567 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, Q,
TIME_SLOTS, 1, &calpha,
573 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasConjTrans, Q, Q,
TIME_SLOTS, &calpha,
579 trace += crealf(pData->_E_dir[q*Q+q]);
580 cblas_sscal(2*Q*Q, trace, (
float*)pData->_Cy, 1);
584 cblas_sscal(2*Q*Q, pData->
covAvgCoeff, (
float*)pData->
Cy[src][band], 1);
585 cblas_saxpy(2*Q*Q, 1.0f-pData->
covAvgCoeff, (
float*)pData->_Cy, 1, (
float*)pData->
Cy[src][band], 1);
596 Ey += crealf(pData->
Cy[src][band][i*Q+i]);
597 Eproto += crealf(pData->
Cproto[src][band][i*Q+i])+0.000001f;
600 Gcomp = sqrtf(Eproto/(Ey+2.23e-9f));
604 memcpy(pData->_Cy, pData->
Cy[src][band], Q*Q*
sizeof(float_complex));
605 cblas_sscal(2*Q*Q, Gcomp, (
float*)pData->_Cy, 1);
606 utility_cseig(NULL, pData->_Cy, Q, 1, pData->_V, pData->_D, NULL);
609 pData->_D[i*Q+j] = i==j ? csqrtf(pData->_D[i*Q+j]) : cmplxf(0.0f, 0.0f);
610 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, Q, Q, Q, &calpha,
612 pData->_D, Q, &cbeta,
613 pData->
new_M[band], Q);
622 cblas_ccopy(Q*Q, pData->
Cproto[src][band], 1, pData->_Cproto, 1);
626 pData->_Cproto[i*Q+i] = craddf(pData->_Cproto[i*Q+i], 0.00001f);
627 CprotoDiag[i*Q+j] = i==j ? crealf(pData->_Cproto[i*Q+i]) : 0.0f;
638 H_tmp[q] = pData->
H_grid[band*Q*pData->
nGrid + q*pData->
nGrid + centre_ind];
639 cblas_cgemm(CblasRowMajor, CblasNoTrans, CblasConjTrans, Q, Q, 1, &calpha,
643 memset(CxDiag, 0, Q*Q*
sizeof(
float));
645 CxDiag[i*Q+i] = crealf(Cx[i*Q+i]);
655 memcpy(pData->
new_M[band], pData->
Qmix_cmplx, Q*Q*
sizeof(float_complex));
656 memset(pData->
new_Mr[band], 0, Q*Q*
sizeof(
float));
669 cblas_cdotu_sub(Q, (float_complex*)(&(pData->
interp_M[i*Q])), 1,
705 for (ch = 0; ch <
SAF_MIN(Q, nOutputs); ch++)
707 for (; ch < nOutputs; ch++)
711 for (ch=0; ch < nOutputs; ch++)
742 if(newAzi_deg>180.0f)
743 newAzi_deg = -360.0f + newAzi_deg;
744 newAzi_deg =
SAF_MAX(newAzi_deg, -180.0f);
745 newAzi_deg =
SAF_MIN(newAzi_deg, 180.0f);
754 newElev_deg =
SAF_MAX(newElev_deg, -90.0f);
755 newElev_deg =
SAF_MIN(newElev_deg, 90.0f);
764 newSpread_deg =
SAF_MAX(newSpread_deg, 0.0f);
765 newSpread_deg =
SAF_MIN(newSpread_deg, 360.0f);
#define MAX_NUM_CHANNELS
Maximum number of input/output channels supported.
#define MAX_NUM_INPUTS
Maximum number of input channels supported.
#define MAX_NUM_OUTPUTS
Maximum number of output channels supported.
#define PROGRESSBARTEXT_CHAR_LENGTH
Length of progress bar string.
@ PROC_STATUS_ONGOING
Codec is processing input audio, and should not be reinitialised at this time.
@ PROC_STATUS_NOT_ONGOING
Codec is not processing input audio, and may be reinitialised if needed.
CODEC_STATUS
Current status of the codec.
@ CODEC_STATUS_NOT_INITIALISED
Codec has not yet been initialised, or the codec configuration has changed.
@ CODEC_STATUS_INITIALISED
Codec is initialised and ready to process input audio.
@ CODEC_STATUS_INITIALISING
Codec is currently being initialised, input audio should not be processed.
void afSTFT_FIRtoFilterbankCoeffs(float *hIR, int N_dirs, int nCH, int ir_len, int hopSize, int LDmode, int hybridmode, float_complex *hFB)
Converts FIR filters into Filterbank Coefficients by passing them through the afSTFT filterbank.
void afSTFT_create(void **const phSTFT, int nCHin, int nCHout, int hopsize, int lowDelayMode, int hybridmode, AFSTFT_FDDATA_FORMAT format)
Creates an instance of afSTFT.
void afSTFT_backward_knownDimensions(void *const hSTFT, float_complex ***dataFD, int framesize, int dataFD_nCH, int dataFD_nHops, float **dataTD)
Performs backward afSTFT transform (dataFD dimensions are known)
void afSTFT_forward_knownDimensions(void *const hSTFT, float **dataTD, int framesize, int dataFD_nCH, int dataFD_nHops, float_complex ***dataFD)
Performs forward afSTFT transform (dataFD dimensions are known)
void afSTFT_getCentreFreqs(void *const hSTFT, float fs, int nBands, float *freqVector)
Returns current frequency vector.
void afSTFT_destroy(void **const phSTFT)
Destroys an instance of afSTFT.
@ AFSTFT_BANDS_CH_TIME
nBands x nChannels x nTimeHops
#define TIME_SLOTS
Number of STFT timeslots.
#define HOP_SIZE
STFT hop size.
#define HYBRID_BANDS
Number of frequency bands.
void formulate_M_and_Cr_cmplx(void *const hCdf, float_complex *Cx, float_complex *Cy, float_complex *Q, int useEnergyFLAG, float reg, float_complex *M, float_complex *Cr)
Computes the optimal mixing matrices.
void cdf4sap_create(void **const phCdf, int nXcols, int nYcols)
Creates an instance of the Covariance Domain Framework.
void cdf4sap_cmplx_destroy(void **const phCdf)
Destroys an instance of the Covariance Domain Framework.
void cdf4sap_destroy(void **const phCdf)
Destroys an instance of the Covariance Domain Framework.
void cdf4sap_cmplx_create(void **const phCdf, int nXcols, int nYcols)
Creates an instance of the Covariance Domain Framework.
void formulate_M_and_Cr(void *const hCdf, float *Cx, float *Cy, float *Q, int useEnergyFLAG, float reg, float *M, float *Cr)
Computes the optimal mixing matrices.
const int __default_N_hrir_dirs
The number of directions/measurements in the default HRIR dataset.
const float __default_hrirs[836][2][256]
The default HRIR data for SAF.
const float __default_hrir_dirs_deg[836][2]
The measurement directions used for the default HRIR dataset.
const int __default_hrir_len
The length of the filters, in samples, for the default HRIR dataset.
const int __default_hrir_fs
The samplerate used to measure the default HRIR filters.
void resampleHRIRs(float *hrirs_in, int hrirs_N_dirs, int hrirs_in_len, int hrirs_in_fs, int hrirs_out_fs, int padToNextPow2, float **hrirs_out, int *hrirs_out_len)
Resamples a set of HRIRs from its original samplerate to a new samplerate.
void saf_sofa_close(saf_sofa_container *c)
Frees all SOFA data in a sofa_container.
SAF_SOFA_ERROR_CODES saf_sofa_open(saf_sofa_container *h, char *sofa_filepath, SAF_SOFA_READER_OPTIONS option)
Fills a 'sofa_container' with data found in a SOFA file (GeneralFIR or SimpleFreeFieldHRIR),...
SAF_SOFA_ERROR_CODES
SOFA loader error codes.
@ SAF_SOFA_READER_OPTION_DEFAULT
The default option is SAF_SOFA_READER_OPTION_LIBMYSOFA.
@ SAF_SOFA_OK
None of the error checks failed.
#define saf_print_error(message)
Macro to print a error message along with the filename and line number.
#define saf_assert(x, message)
Macro to make an assertion, along with a string explaining its purpose.
#define SAF_CLAMP(a, min, max)
Ensures value "a" is clamped between the "min" and "max" values.
#define SAF_PI
pi constant (single precision)
#define SAF_MAX(a, b)
Returns the maximum of the two values.
void convert_0_360To_m180_180(float *dirs_deg, int nDirs)
Wraps around any angles exeeding 180 degrees (e.g., 200-> -160)
#define NUM_EARS
2 (true for most humans)
void getVoronoiWeights(float *dirs_deg, int nDirs, int diagFLAG, float *weights)
Computes the integration weights, based on the areas of each face of the corresponding Voronoi diagra...
#define FOURPI
4pi (single precision)
void utility_svvcopy(const float *a, const int len, float *c)
Single-precision, vector-vector copy, i.e.
void utility_cseig(void *const hWork, const float_complex *A, const int dim, int sortDecFLAG, float_complex *V, float_complex *D, float *eig)
Eigenvalue decomposition of a SYMMETRIC/HERMITION matrix: single precision complex,...
void latticeDecorrelator_apply(void *hDecor, float_complex ***inFrame, int nTimeSlots, float_complex ***decorFrame)
Applies the lattice all-pass-filter-based multi-channel signal decorrelator.
#define SAF_MIN(a, b)
Returns the minimum of the two values.
void latticeDecorrelator_create(void **phDecor, float fs, int hopsize, float *freqVector, int nBands, int nCH, int *orders, float *freqCutoffs, int nCutoffs, int maxDelay, int lookupOffset, float enComp_coeff)
Creates an instance of the lattice all-pass-filter-based multi-channel signal decorrelator.
void unitSph2cart(float *dirs, int nDirs, int anglesInDegreesFLAG, float *dirs_xyz)
Converts spherical coordinates to Cartesian coordinates of unit length.
#define saf_print_warning(message)
Macro to print a warning message along with the filename and line number.
void utility_cvsmul(float_complex *a, const float_complex *s, const int len, float_complex *c)
Single-precision, complex, multiplies each element in vector 'a' with a scalar 's',...
void latticeDecorrelator_destroy(void **phDecor)
Destroys an instance of the lattice all-pass-filter-based multi-channel signal decorrelator.
void utility_svsmul(float *a, const float *s, const int len, float *c)
Single-precision, multiplies each element in vector 'a' with a scalar 's', i.e.
void utility_siminv(const float *a, const int len, int *index)
Single-precision, index of minimum absolute value in a vector, i.e.
void ** malloc2d(size_t dim1, size_t dim2, size_t data_size)
2-D malloc (contiguously allocated, so use free() as usual to deallocate)
void ** realloc2d(void **ptr, size_t dim1, size_t dim2, size_t data_size)
2-D realloc which does NOT retain previous data order
void * malloc1d(size_t dim1_data_size)
1-D malloc (same as malloc, but with error checking)
void * realloc1d(void *ptr, size_t dim1_data_size)
1-D realloc (same as realloc, but with error checking)
void *** malloc3d(size_t dim1, size_t dim2, size_t dim3, size_t data_size)
3-D malloc (contiguously allocated, so use free() as usual to deallocate)
#define FLATTEN2D(A)
Use this macro when passing a 2-D dynamic multi-dimensional array to memset, memcpy or any other func...
int spreader_getNumSources(void *const hSpr)
Returns the number of inputs/sources in the current config.
int spreader_getProcessingDelay(void)
Returns the processing delay in samples (may be used for delay compensation purposes)
int spreader_getIRsamplerate(void *const hSpr)
Returns the IR sample rate.
int spreader_getMaxNumSources(void)
Returns the maximum number of input sources supported by spreader.
int spreader_getNDirs(void *const hSpr)
Returns the number of directions in the currently used HRIR set.
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.
float spreader_getIRAzi_deg(void *const hSpr, int index)
Returns the IR/TF azimuth for a given 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.
int * spreader_getDirectionActivePtr(void *const hSpr, int index)
Returns the pointer to a vector describing which directions are currently being used for the spreadin...
void spreader_setSpreadingMode(void *const hSpr, int newMode)
Sets the spreading mode (see SPREADER_PROC_MODES)
float spreader_getSourceElev_deg(void *const hSpr, int index)
Returns the source elevation for a given source index, in DEGREES.
void spreader_create(void **const phSpr)
Creates an instance of the spreader.
int spreader_getFrameSize(void)
Returns the processing framesize (i.e., number of samples processed with every _process() call )
int spreader_getIRlength(void *const hSpr)
Returns the length of IRs in time-domain samples.
int spreader_getDAWsamplerate(void *const hSpr)
Returns the DAW/Host sample rate.
void spreader_initCodec(void *const hSpr)
Intialises the codec variables, based on current global/user parameters.
float spreader_getAveragingCoeff(void *const hSpr)
Returns the averaging coefficient [0..1].
float spreader_getProgressBar0_1(void *const hSpr)
(Optional) Returns current intialisation/processing progress, between 0..1
float spreader_getIRElev_deg(void *const hSpr, int index)
Returns the IR/TF elevation for a given index, in DEGREES.
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.
float spreader_getSourceSpread_deg(void *const hSpr, int index)
Returns the source spread for a given source index, in DEGREES.
void spreader_getProgressBarText(void *const hSpr, char *text)
(Optional) Returns current intialisation/processing progress text
int spreader_getNumOutputs(void *const hSpr)
Returns the number of ears possessed by the average homo sapien.
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_setNumSources(void *const hSpr, int new_nSources)
Sets the number of input channels/sources to binauralise.
void spreader_refreshSettings(void *const hSpr)
Sets all intialisation flags to 1; re-initialising all settings/variables as spreader is currently co...
int spreader_getUseDefaultHRIRsflag(void *const hSpr)
Returns the value of a flag used to dictate whether the default HRIRs in the Spatial_Audio_Framework ...
void spreader_setSourceAzi_deg(void *const hSpr, int index, float newAzi_deg)
Sets the panning azimuth for a specific channel index, in DEGREES.
float spreader_getSourceAzi_deg(void *const hSpr, int index)
Returns the source azimuth for a given source index, in DEGREES.
void spreader_destroy(void **const phSpr)
Destroys an instance of the spreader.
int spreader_getSpreadingMode(void *const hSpr)
Returns the spreading mode (see SPREADER_PROC_MODES)
void spreader_setAveragingCoeff(void *const hSpr, float newValue)
Sets the averaging coefficient [0..1].
char * spreader_getSofaFilePath(void *const hSpr)
Returns the file path for a .sofa file.
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),...
void spreader_init(void *const hSpr, int sampleRate)
Initialises an instance of spreader with default settings.
CODEC_STATUS spreader_getCodecStatus(void *const hSpr)
Returns current codec status codec status (see CODEC_STATUS enum)
SPREADER_PROC_MODES
Available processing modes.
@ SPREADER_MODE_NAIVE
Simple coherent copies of the input signal(s) areassigned to the spreading areas.
@ SPREADER_MODE_EVD
Basic solution based on an Eigenvalue decomposition.
@ SPREADER_MODE_OM
Optimal mixing solution.
#define SPREADER_MAX_NUM_SOURCES
Maximum number of sources supported by the spreader example.
void spreader_setCodecStatus(void *const hSpr, CODEC_STATUS newStatus)
Sets codec status (see CODEC_STATUS enum)
An arbitrary array panner (HRIRs, microphone array IRs, etc.) with coherent and incoherent spreading ...
#define SPREADER_FRAME_SIZE
Framesize, in time-domain samples.
#define MAX_SPREAD_FREQ
Maximum spread frequency, above which no spreading occurs.
SOFA container struct comprising all possible data that can be extracted from SOFA 1....
int DataLengthIR
Length of the IRs, in samples.
int nSources
Number of source/measurement positions.
float * SourcePosition
Source positions (refer to SourcePositionType & SourcePositionUnits for the convention and units); FL...
float DataSamplingRate
Sampling rate used to measure the IRs.
float * DataIR
The impulse response (IR) Data; FLAT:nSources x nReceivers x DataLengthIR.
Main structure for spreader.
_Atomic_FLOAT32 covAvgCoeff
Covariance matrix averaging coefficient, [0..1].
float interpolatorFadeOut[TIME_SLOTS]
Linear Interpolator - Fade out.
_Atomic_INT32 h_len
Length of time-domain filters, in samples.
void * hCdf_res
covariance domain framework handle for the residual
int fs
Host sampling rate, in Hz.
float_complex *** spreadframeTF
time-frequency domain spread frame; HYBRID_BANDS x MAX_NUM_OUTPUTS x TIME_SLOTS
_Atomic_CODEC_STATUS codecStatus
see CODEC_STATUS
int firstInit
flag, 1: _init() function has never been called, 0: _init() function has been called
_Atomic_INT32 h_orig_fs
Can be different from h_fs if IRs were resampled.
float ** inputFrameTD
time-domain input frame; MAX_NUM_INPUTS x SPREADER_FRAME_SIZE
_Atomic_FLOAT32 h_fs
Sample rate used to measure the filters.
void * hSTFT
afSTFT handle
float_complex ** prev_M[SPREADER_MAX_NUM_SOURCES]
previous mixing matrices; HYBRID_BANDS x FLAT:(Q x Q)
float_complex *** inputframeTF
time-frequency domain input frame; HYBRID_BANDS x MAX_NUM_INPUTS x TIME_SLOTS
float_complex * interp_Mr_cmplx
Complex variant of interp_Mr.
float * h_grid
FLAT: nGrid x Q x h_len.
float * grid_dirs_xyz
Grid directions as unit-length Cartesian coordinates; FLAT: nGrid x 3.
float_complex ** Cy[SPREADER_MAX_NUM_SOURCES]
Target covariance matrices; HYBRID_BANDS x FLAT:(Q x Q)
float * Qmix
Identity; FLAT: Q x Q.
float_complex * Qmix_cmplx
Identity; FLAT: Q x Q.
float_complex ** HHH[HYBRID_BANDS]
Pre-computed array outer-products; HYBRID_BANDS x nGrid x FLAT: (Q x Q)
float ** prev_Mr[SPREADER_MAX_NUM_SOURCES]
previous residual mixing matrices; HYBRID_BANDS x FLAT:(Q x Q)
float_complex *** outputframeTF
time-frequency domain output frame; HYBRID_BANDS x MAX_NUM_OUTPUTS x TIME_SLOTS
void * hDecor[SPREADER_MAX_NUM_SOURCES]
handles for decorrelators
_Atomic_INT32 Q
Number of channels in the target playback setup; for example: 2 for binaural.
float_complex ** new_M
mixing matrices; HYBRID_BANDS x FLAT:(Q x Q)
float ** new_Mr
residual mixing matrices; HYBRID_BANDS x FLAT:(Q x Q)
int * dirActive[SPREADER_MAX_NUM_SOURCES]
1: IR direction currently used for spreading, 0: not
_Atomic_FLOAT32 src_spread[SPREADER_MAX_NUM_SOURCES]
Source spreading, in degrees.
float ** outframeTD
time-domain output frame; MAX_NUM_OUTPUTS x SPREADER_FRAME_SIZE
float_complex *** decorframeTF
time-frequency domain decorrelated frame; HYBRID_BANDS x MAX_NUM_OUTPUTS x TIME_SLOTS
char * progressBarText
Current (re)initialisation step, string.
_Atomic_FLOAT32 src_dirs_deg[SPREADER_MAX_NUM_SOURCES][2]
Source directions, in degrees.
char * sofa_filepath
SOFA file path.
float * Cr
Residual covariance; FLAT: Q x Q.
_Atomic_SPREADER_PROC_MODES new_procMode
See SPREADER_PROC_MODES (current value will be replaced by this after next re-init)
float_complex ** Cproto[SPREADER_MAX_NUM_SOURCES]
Current prototype covariance matrices; HYBRID_BANDS x FLAT:(Q x Q)
float freqVector[HYBRID_BANDS]
Frequency vector (filterbank centre frequencies)
float * angles
angles; nGrid x 1
_Atomic_INT32 nSources
Current number of input signals.
float * interp_Mr
Interpolated residual mixing matrix; FLAT:(Q x Q)
_Atomic_INT32 new_nSources
New number of input signals (current value will be replaced by this after next re-init)
_Atomic_INT32 useDefaultHRIRsFLAG
1: use default HRIRs in database, 0: use the measurements from SOFA file (can be anything,...
_Atomic_FLOAT32 progressBar0_1
Current (re)initialisation progress, between [0..1].
float_complex * H_grid
FLAT: HYBRID_BANDS x Q x nGrid.
void * hCdf
covariance domain framework handle
float * grid_dirs_deg
Grid directions, in degrees; FLAT: nGrid x 2.
_Atomic_PROC_STATUS procStatus
see PROC_STATUS
float interpolatorFadeIn[TIME_SLOTS]
Linear Interpolator - Fade in.
float * weights
Integration weights; nGrid x 1.
_Atomic_SPREADER_PROC_MODES procMode
See SPREADER_PROC_MODES.
_Atomic_INT32 nGrid
Number of directions/measurements/HRTFs etc.
float_complex * interp_M
Interpolated mixing matrix; FLAT:(Q x Q)
float_complex *** protoframeTF
time-frequency domain prototype frame; HYBRID_BANDS x MAX_NUM_OUTPUTS x TIME_SLOTS
float_complex * Cr_cmplx
Residual covariance; FLAT: Q x Q.