SAF
|
A basic Ambisonic encoder. More...
#include "_common.h"
Go to the source code of this file.
Functions | |
void | ambi_enc_create (void **const phAmbi) |
Creates an instance of ambi_enc. | |
void | ambi_enc_destroy (void **const phAmbi) |
Destroys an instance of ambi_enc. | |
void | ambi_enc_init (void *const hAmbi, int samplerate) |
Initialises an instance of ambi_enc with default settings. | |
void | ambi_enc_process (void *const hAmbi, const float *const *inputs, float *const *outputs, int nInputs, int nOutputs, int nSamples) |
Encodes input signals into spherical harmonic signals, at the specified encoding directions. | |
void | ambi_enc_refreshParams (void *const hAmbi) |
Sets all intialisation flags to 1; re-initialising all settings/variables as ambi_enc is currently configured, at next available opportunity. | |
void | ambi_enc_setOutputOrder (void *const hAmbi, int newValue) |
Sets the encoding order (see SH_ORDERS enum) | |
void | ambi_enc_setSourceAzi_deg (void *const hAmbi, int index, float newAzi_deg) |
Sets the azimuth for a specific source index. | |
void | ambi_enc_setSourceElev_deg (void *const hAmbi, int index, float newElev_deg) |
Sets the elevation for a specific source index. | |
void | ambi_enc_setNumSources (void *const hAmbi, int new_nSources) |
Sets the number of input signals/sources to encode. | |
void | ambi_enc_setInputConfigPreset (void *const hAmbi, int newPresetID) |
Sets the input configuration preset (see SOURCE_CONFIG_PRESETS enum) | |
void | ambi_enc_setChOrder (void *const hAmbi, int newOrder) |
Sets the Ambisonic channel ordering convention to encode with (see CH_ORDER enum) | |
void | ambi_enc_setNormType (void *const hAmbi, int newType) |
Sets the Ambisonic normalisation convention to encode with (see NORM_TYPES enum) | |
void | ambi_enc_setEnablePostScaling (void *const hAmbi, int newStatus) |
By default, ambi_enc will scale the output signals by the number of input signals. | |
void | ambi_enc_setSourceGain (void *const hAmbi, int srcIdx, float newGain) |
Sets gain factor for an input source. | |
void | ambi_enc_setSourceSolo (void *const hAmbi, int srcIdx) |
Set a source to solo. | |
void | ambi_enc_setUnSolo (void *const hAmbi) |
Unsolo / unmute all sources. | |
int | ambi_enc_getFrameSize (void) |
Returns the processing framesize (i.e., number of samples processed with every _process() call ) | |
int | ambi_enc_getOutputOrder (void *const hAmbi) |
Returns the decoding order (see SH_ORDERS enum) | |
float | ambi_enc_getSourceAzi_deg (void *const hAmbi, int index) |
Returns the azimuth for a specific source, in DEGREES. | |
float | ambi_enc_getSourceElev_deg (void *const hAmbi, int index) |
Returns the elevation for a specific source, in DEGREES. | |
int | ambi_enc_getNumSources (void *const hAmbi) |
Returns the number of input signals/sources to encode. | |
int | ambi_enc_getMaxNumSources (void) |
Returns the maximum number of input signals/sources that can be encoded. | |
int | ambi_enc_getNSHrequired (void *const hAmbi) |
Returns the number of spherical harmonic signals required by the current decoding order: (current_order+1)^2. | |
int | ambi_enc_getChOrder (void *const hAmbi) |
Returns the Ambisonic channel ordering convention currently being used to encode with (see CH_ORDER enum) | |
int | ambi_enc_getNormType (void *const hAmbi) |
Returns the Ambisonic normalisation convention currently being used to encode with (see NORM_TYPES enum) | |
int | ambi_enc_getEnablePostScaling (void *const hAmbi) |
Returns 0: if post scaling is disabled, 1: if post scaling is enabled. | |
int | ambi_enc_getProcessingDelay (void) |
Returns the processing delay in samples (may be used for delay compensation features) | |
void ambi_enc_create | ( | void **const | phAmbi | ) |
Creates an instance of ambi_enc.
[in] | phAmbi | (&) address of ambi_enc handle |
Definition at line 29 of file ambi_enc.c.
void ambi_enc_destroy | ( | void **const | phAmbi | ) |
Destroys an instance of ambi_enc.
[in] | phAmbi | (&) address of ambi_enc handle |
Definition at line 54 of file ambi_enc.c.
int ambi_enc_getChOrder | ( | void *const | hAmbi | ) |
Returns the Ambisonic channel ordering convention currently being used to encode with (see CH_ORDER enum)
Definition at line 353 of file ambi_enc.c.
int ambi_enc_getEnablePostScaling | ( | void *const | hAmbi | ) |
Returns 0: if post scaling is disabled, 1: if post scaling is enabled.
Definition at line 365 of file ambi_enc.c.
int ambi_enc_getFrameSize | ( | void | ) |
Returns the processing framesize (i.e., number of samples processed with every _process() call )
Definition at line 202 of file ambi_enc.c.
int ambi_enc_getMaxNumSources | ( | void | ) |
Returns the maximum number of input signals/sources that can be encoded.
Definition at line 342 of file ambi_enc.c.
int ambi_enc_getNormType | ( | void *const | hAmbi | ) |
Returns the Ambisonic normalisation convention currently being used to encode with (see NORM_TYPES enum)
Definition at line 359 of file ambi_enc.c.
int ambi_enc_getNSHrequired | ( | void *const | hAmbi | ) |
Returns the number of spherical harmonic signals required by the current decoding order: (current_order+1)^2.
Definition at line 347 of file ambi_enc.c.
int ambi_enc_getNumSources | ( | void *const | hAmbi | ) |
Returns the number of input signals/sources to encode.
Definition at line 336 of file ambi_enc.c.
int ambi_enc_getOutputOrder | ( | void *const | hAmbi | ) |
Returns the decoding order (see SH_ORDERS enum)
If decoding order is higher than the input signal order, the extra required channels are filled with zeros. If the decoding order is lower than the input signal order, the number input signals is truncated accordingly.
Definition at line 318 of file ambi_enc.c.
int ambi_enc_getProcessingDelay | ( | void | ) |
Returns the processing delay in samples (may be used for delay compensation features)
Definition at line 371 of file ambi_enc.c.
float ambi_enc_getSourceAzi_deg | ( | void *const | hAmbi, |
int | index ) |
Returns the azimuth for a specific source, in DEGREES.
Definition at line 324 of file ambi_enc.c.
float ambi_enc_getSourceElev_deg | ( | void *const | hAmbi, |
int | index ) |
Returns the elevation for a specific source, in DEGREES.
Definition at line 330 of file ambi_enc.c.
void ambi_enc_init | ( | void *const | hAmbi, |
int | samplerate ) |
Initialises an instance of ambi_enc with default settings.
[in] | hAmbi | ambi_enc handle |
[in] | samplerate | Host samplerate. |
Definition at line 68 of file ambi_enc.c.
void ambi_enc_process | ( | void *const | hAmbi, |
const float *const * | inputs, | ||
float *const * | outputs, | ||
int | nInputs, | ||
int | nOutputs, | ||
int | nSamples ) |
Encodes input signals into spherical harmonic signals, at the specified encoding directions.
[in] | hAmbi | ambi_enc handle |
[in] | inputs | Input channel buffers; 2-D array: nInputs x nSamples |
[in] | outputs | Output channel buffers; 2-D array: nOutputs x nSamples |
[in] | nInputs | Number of input channels |
[in] | nOutputs | Number of output channels |
[in] | nSamples | Number of samples in 'inputs'/'output' matrices |
Definition at line 88 of file ambi_enc.c.
void ambi_enc_refreshParams | ( | void *const | hAmbi | ) |
Sets all intialisation flags to 1; re-initialising all settings/variables as ambi_enc is currently configured, at next available opportunity.
Definition at line 207 of file ambi_enc.c.
void ambi_enc_setChOrder | ( | void *const | hAmbi, |
int | newOrder ) |
Sets the Ambisonic channel ordering convention to encode with (see CH_ORDER enum)
Definition at line 271 of file ambi_enc.c.
void ambi_enc_setEnablePostScaling | ( | void *const | hAmbi, |
int | newStatus ) |
By default, ambi_enc will scale the output signals by the number of input signals.
Definition at line 285 of file ambi_enc.c.
void ambi_enc_setInputConfigPreset | ( | void *const | hAmbi, |
int | newPresetID ) |
Sets the input configuration preset (see SOURCE_CONFIG_PRESETS enum)
Definition at line 261 of file ambi_enc.c.
void ambi_enc_setNormType | ( | void *const | hAmbi, |
int | newType ) |
Sets the Ambisonic normalisation convention to encode with (see NORM_TYPES enum)
Definition at line 278 of file ambi_enc.c.
void ambi_enc_setNumSources | ( | void *const | hAmbi, |
int | new_nSources ) |
Sets the number of input signals/sources to encode.
Definition at line 251 of file ambi_enc.c.
void ambi_enc_setOutputOrder | ( | void *const | hAmbi, |
int | newValue ) |
Sets the encoding order (see SH_ORDERS enum)
Definition at line 215 of file ambi_enc.c.
void ambi_enc_setSourceAzi_deg | ( | void *const | hAmbi, |
int | index, | ||
float | newAzi_deg ) |
Sets the azimuth for a specific source index.
[in] | hAmbi | ambi_enc handle |
[in] | index | Source index |
[in] | newAzi_deg | New azimuth, in DEGREES |
Definition at line 231 of file ambi_enc.c.
void ambi_enc_setSourceElev_deg | ( | void *const | hAmbi, |
int | index, | ||
float | newElev_deg ) |
Sets the elevation for a specific source index.
[in] | hAmbi | ambi_enc handle |
[in] | index | Source index |
[in] | newElev_deg | New elevation, in DEGREES |
Definition at line 242 of file ambi_enc.c.
void ambi_enc_setSourceGain | ( | void *const | hAmbi, |
int | srcIdx, | ||
float | newGain ) |
Sets gain factor for an input source.
Definition at line 291 of file ambi_enc.c.
void ambi_enc_setSourceSolo | ( | void *const | hAmbi, |
int | srcIdx ) |
void ambi_enc_setUnSolo | ( | void *const | hAmbi | ) |