40#ifndef __AMBI_DRC_INTERNAL_H_INCLUDED__
41#define __AMBI_DRC_INTERNAL_H_INCLUDED__
55#if !defined(AMBI_DRC_FRAME_SIZE)
56# if defined(FRAME_SIZE)
57# define AMBI_DRC_FRAME_SIZE ( FRAME_SIZE )
59# define AMBI_DRC_FRAME_SIZE ( 128 )
62#define HOP_SIZE ( 128 )
63#define HYBRID_BANDS ( HOP_SIZE + 5 )
64#define TIME_SLOTS ( AMBI_DRC_FRAME_SIZE / HOP_SIZE )
67#if (AMBI_DRC_FRAME_SIZE % HOP_SIZE != 0)
68# error "AMBI_DRC_FRAME_SIZE must be an integer multiple of HOP_SIZE"
79typedef struct _ambi_drc
95#ifdef ENABLE_TF_DISPLAY
99 float** gainsTF_bank0;
100 float** gainsTF_bank1;
NORM_TYPES
Available Ambisonic normalisation conventions.
CH_ORDER
Available Ambisonic channel ordering conventions.
SH_ORDERS
Available spherical harmonic (SH) input/output order options.
#define HYBRID_BANDS
Number of frequency bands.
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.
Main include header for the Spatial_Audio_Framework (SAF)
Include header for SAF externals.
Main structure for ambi_drc.
float ratio
Compression ratio.
float attack_ms
Attack time, in ms.
float knee
Knee width, in dB.
NORM_TYPES norm
Ambisonic normalisation convention (see NORM_TYPES)
int reInitTFT
0: no init required, 1: init required, 2: init in progress
SH_ORDERS currentOrder
Current input SH order.
void * hSTFT
Time-frequency transform handle.
float ** frameTD
Input/output SH signals, in the time-domain; MAX_NUM_SH_SIGNALS x AMBI_DRC_FRAME_SIZE.
float_complex *** inputFrameTF
Input SH signals, in the time-frequency domain; HYBRID_BANDS x MAX_NUM_SH_SIGNALS x TIME_SLOTS.
CH_ORDER chOrdering
Ambisonic channel order convention (see CH_ORDER)
float theshold
Threshold parameter, in dB.
float_complex *** outputFrameTF
Output SH signals, in the time-frequency domain; HYBRID_BANDS x MAX_NUM_SH_SIGNALS x TIME_SLOTS.
float outGain
Post-gain, in dB.
float inGain
Pre-gain, in dB.
int nSH
Current number of SH signals.
float release_ms
Release time, in ms.
int new_nSH
New number of SH signals (current value will be replaced by this after next re-init)
float fs
Host sampling rate, in Hz.