55 if (2.0f*(xG - T) < -W)
57 else if (2.0f*(fabsf(xG - T)) <= W)
58 yG = xG + (1.0f / R - 1.0f) * powf(xG - T + W / 2.0f, 2.0f) / (2.0f*W);
59 else if (2.0f*(xG - T) > W)
60 yG = T + (xG - T) / R;
80 yL = alpha_a*yL_z1 + (1.0f - alpha_a) * xL;
82 yL = alpha_r*yL_z1 + (1.0f - alpha_r) * xL;
95 if (pData->
hSTFT == NULL)
SH_ORDERS
Available spherical harmonic (SH) input/output order options.
@ SH_ORDER_SECOND
Second-order (9 channels)
@ SH_ORDER_FOURTH
Fourth-order (25 channels)
@ SH_ORDER_FIRST
First-order (4 channels)
@ SH_ORDER_THIRD
Third-order (16 channels)
@ SH_ORDER_FIFTH
Fifth-order (36 channels)
@ SH_ORDER_EIGHTH
Eighth-order (81 channels)
@ SH_ORDER_NINTH
Ninth-order (100 channels)
@ SH_ORDER_TENTH
Tenth-order (121 channels)
@ SH_ORDER_SIXTH
Sixth-order (49 channels)
@ SH_ORDER_SEVENTH
Seventh-order (64 channels)
void afSTFT_clearBuffers(void *const hSTFT)
Flushes time-domain buffers with zeros.
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_channelChange(void *const hSTFT, int new_nCHin, int new_nCHout)
Re-allocates memory to support a change in the number of input/output channels.
@ AFSTFT_BANDS_CH_TIME
nBands x nChannels x nTimeHops
#define HOP_SIZE
STFT hop size.
A frequency-dependent Ambisonic sound scene dynamic range compressor (DRC)
void ambi_drc_setInputOrder(SH_ORDERS inOrder, int *nSH)
Sets the internal input order.
float ambi_drc_gainComputer(float xG, float T, float R, float W)
The DRC gain computer.
void ambi_drc_initTFT(void *const hAmbi)
Initialise the filterbank used by ambi_drc.
float ambi_drc_smoothPeakDetector(float xL, float yL_z1, float alpha_a, float alpha_r)
The envelope detector.
A frequency-dependent Ambisonic sound scene dynamic range compressor (DRC)
Main structure for ambi_drc.
void * hSTFT
Time-frequency transform handle.
int nSH
Current number of SH signals.
int new_nSH
New number of SH signals (current value will be replaced by this after next re-init)