50#ifndef __AMBI_DRC_H_INCLUDED__
51#define __AMBI_DRC_H_INCLUDED__
59#define ENABLE_TF_DISPLAY
65#ifdef ENABLE_TF_DISPLAY
67# define AMBI_DRC_NUM_DISPLAY_SECONDS ( 8 )
69# define AMBI_DRC_NUM_DISPLAY_TIME_SLOTS ( (int)(AMBI_DRC_NUM_DISPLAY_SECONDS*48000.0f/(float)128) )
71# define AMBI_DRC_READ_OFFSET ( 200 )
73# define AMBI_DRC_NUM_BANDS ( 133 )
76#define AMBI_DRC_SPECTRAL_FLOOR (0.1585f)
78#define AMBI_DRC_IN_GAIN_MIN_VAL ( -40.0f )
79#define AMBI_DRC_IN_GAIN_MAX_VAL ( 20.0f )
80#define AMBI_DRC_THRESHOLD_MIN_VAL ( -60.0f )
81#define AMBI_DRC_THRESHOLD_MAX_VAL ( 0.0f )
82#define AMBI_DRC_RATIO_MIN_VAL ( 1.0f )
83#define AMBI_DRC_RATIO_MAX_VAL ( 30.0f )
84#define AMBI_DRC_KNEE_MIN_VAL ( 0.0f )
85#define AMBI_DRC_KNEE_MAX_VAL ( 10.0f )
86#define AMBI_DRC_ATTACK_MIN_VAL ( 10.0f )
87#define AMBI_DRC_ATTACK_MAX_VAL ( 200.0f )
88#define AMBI_DRC_RELEASE_MIN_VAL ( 50.0f )
89#define AMBI_DRC_RELEASE_MAX_VAL ( 1000.0f )
90#define AMBI_DRC_OUT_GAIN_MIN_VAL ( -20.0f )
91#define AMBI_DRC_OUT_GAIN_MAX_VAL ( 40.0f )
132 const float *
const * inputs,
133 float*
const* outputs,
A bunch of things that are common to many of the saf examples.
SH_ORDERS
Available spherical harmonic (SH) input/output order options.
void ambi_drc_setKnee(void *const hAmbi, float newValue)
Sets the compressor knee value; 0: hard knee, >0: soft knee, in DECIBELS.
void ambi_drc_init(void *const hAmbi, int samplerate)
Initialises an instance of ambi_drc with default settings.
int ambi_drc_getChOrder(void *const hAmbi)
Returns the Ambisonic channel ordering convention currently being used to decode with,...
float * ambi_drc_getFreqVector(void *const hAmbi, int *nFreqPoints)
Returns the frequency vector used by the processing.
float ** ambi_drc_getGainTF(void *const hAmbi)
Returns pointers to historic time-frequency data, which may be used for plotting purposes.
void ambi_drc_process(void *const hAmbi, const float *const *inputs, float *const *outputs, int nCH, int nSamples)
Applies the frequency-dependent dynamic range compression to the input spherical harmonic signals.
int ambi_drc_getNormType(void *const hAmbi)
Returns the Ambisonic normalisation convention currently being usedto decode with,...
float ambi_drc_getThreshold(void *const hAmbi)
Returns the compressor threshold value, in DECIBELS.
int ambi_drc_getGainTFwIdx(void *const hAmbi)
Returns current TF gain data write index.
void ambi_drc_destroy(void **const phAmbi)
Destroys an instance of the ambi_drc.
void ambi_drc_setChOrder(void *const hAmbi, int newOrder)
Sets the Ambisonic channel ordering convention to decode with, in order to match the convention emplo...
void ambi_drc_create(void **const phAmbi)
Creates an instance of the ambi_drc.
float ambi_drc_getKnee(void *const hAmbi)
Returns the compressor knee value 0: hard knee, >0: soft knee, in DECIBELS.
int ambi_drc_getGainTFrIdx(void *const hAmbi)
Returns current TF gain data read index.
void ambi_drc_setOutGain(void *const hAmbi, float newValue)
Sets the compressor output gain value, in DECIBELS.
void ambi_drc_setRelease(void *const hAmbi, float newValue)
Sets the compressor envelope release time, in miliseconds.
void ambi_drc_setNormType(void *const hAmbi, int newType)
Sets the Ambisonic normalisation convention to decode with, in order to match with the convention emp...
int ambi_drc_getNSHrequired(void *const hAmbi)
Returns the number of spherical harmonic signals required by the current decoding order: (current_ord...
float ambi_drc_getOutGain(void *const hAmbi)
Returns the compressor output gain value, in DECIBELS.
void ambi_drc_setRatio(void *const hAmbi, float newValue)
Sets the compression ratio.
void ambi_drc_setInputPreset(void *const hAmbi, SH_ORDERS newPreset)
Sets processing order.
void ambi_drc_setThreshold(void *const hAmbi, float newValue)
Sets the compressor threshold value in DECIBELS.
void ambi_drc_refreshSettings(void *const hAmbi)
Sets all intialisation flags to 1; re-initialising all settings/variables as ambi_drc is currently co...
float ambi_drc_getAttack(void *const hAmbi)
Returns the compressor envelope attack time, in miliseconds.
int ambi_drc_getProcessingDelay(void)
Returns the processing delay in samples; may be used for delay compensation features.
SH_ORDERS ambi_drc_getInputPreset(void *const hAmbi)
Returns the current processing order (see SH_ORDERS enum)
float ambi_drc_getRelease(void *const hAmbi)
Returns the compressor envelope release time, in miliseconds.
int ambi_drc_getSamplerate(void *const hAmbi)
Returns the DAW/Host sample rate.
float ambi_drc_getInGain(void *const hAmbi)
Returns the compressor input gain value, in DECIBELS.
void ambi_drc_setAttack(void *const hAmbi, float newValue)
Sets the compressor envelope attack time, in miliseconds.
void ambi_drc_setInGain(void *const hAmbi, float newValue)
Sets the compressor input gain value, in DECIBELS.
int ambi_drc_getFrameSize(void)
Returns the processing framesize (i.e., number of samples processed with every _process() call )
float ambi_drc_getRatio(void *const hAmbi)
Returns the compression ratio.