32#ifndef __SPREADER_INTERNAL_H_INCLUDED__
33#define __SPREADER_INTERNAL_H_INCLUDED__
47#if !defined(SPREADER_FRAME_SIZE)
48# if defined(FRAME_SIZE)
49# define SPREADER_FRAME_SIZE ( FRAME_SIZE )
51# define SPREADER_FRAME_SIZE ( 512 )
54#define MAX_SPREAD_FREQ ( 16e3f )
55#define HOP_SIZE ( 128 )
56#define HYBRID_BANDS ( HOP_SIZE + 5 )
57#define TIME_SLOTS ( SPREADER_FRAME_SIZE / HOP_SIZE )
60#if (SPREADER_FRAME_SIZE % HOP_SIZE != 0)
61# error "SPREADER_FRAME_SIZE must be an integer multiple of HOP_SIZE"
72typedef struct _spreader
123 float_complex* _tmpFrame, *_H_tmp, *_Cy;
124 float_complex* _E_dir, *_V, *_D;
125 float_complex* _Cproto;
PROC_STATUS
Current status of the processing loop.
CODEC_STATUS
Current status of the codec.
#define TIME_SLOTS
Number of STFT timeslots.
#define HYBRID_BANDS
Number of frequency bands.
Main include header for the Spatial_Audio_Framework (SAF)
Include header for SAF externals.
An arbitrary array panner (HRIRs, microphone array IRs, etc.) with coherent and incoherent spreading ...
SPREADER_PROC_MODES
Available processing modes.
#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)
Main structure for spreader.
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
float ** inputFrameTD
time-domain input frame; MAX_NUM_INPUTS x SPREADER_FRAME_SIZE
float covAvgCoeff
Covariance matrix averaging coefficient, [0..1].
void * hSTFT
afSTFT handle
int new_nSources
New number of input signals (current value will be replaced by this after next re-init)
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 progressBar0_1
Current (re)initialisation progress, between [0..1].
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.
int h_len
Length of time-domain filters, in samples.
float * Qmix
Identity; FLAT: Q x Q.
float_complex * Qmix_cmplx
Identity; FLAT: Q x Q.
float_complex *** outputframeTF
time-frequency domain output frame; HYBRID_BANDS x MAX_NUM_OUTPUTS x TIME_SLOTS
float_complex ** new_M
mixing matrices; HYBRID_BANDS x FLAT:(Q x Q)
SPREADER_PROC_MODES procMode
See SPREADER_PROC_MODES.
float ** new_Mr
residual mixing matrices; HYBRID_BANDS x FLAT:(Q x Q)
float h_fs
Sample rate used to measure the filters.
int useDefaultHRIRsFLAG
1: use default HRIRs in database, 0: use the measurements from SOFA file (can be anything,...
float ** outframeTD
time-domain output frame; MAX_NUM_OUTPUTS x SPREADER_FRAME_SIZE
PROC_STATUS procStatus
see PROC_STATUS
float_complex *** decorframeTF
time-frequency domain decorrelated frame; HYBRID_BANDS x MAX_NUM_OUTPUTS x TIME_SLOTS
char * progressBarText
Current (re)initialisation step, string.
char * sofa_filepath
SOFA file path.
float * Cr
Residual covariance; FLAT: Q x Q.
SPREADER_PROC_MODES new_procMode
See SPREADER_PROC_MODES (current value will be replaced by this after next re-init)
int Q
Number of channels in the target playback setup; for example: 2 for binaural.
float * angles
angles; nGrid x 1
float * interp_Mr
Interpolated residual mixing matrix; FLAT:(Q x Q)
int nSources
Current number of input signals.
CODEC_STATUS codecStatus
see CODEC_STATUS
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.
int nGrid
Number of directions/measurements/HRTFs etc.
float * weights
Integration weights; nGrid x 1.
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.