26#ifndef __AMBI_ENC_INTERNAL_H_INCLUDED__
27#define __AMBI_ENC_INTERNAL_H_INCLUDED__
41#if !defined(AMBI_ENC_FRAME_SIZE)
42# if defined(FRAME_SIZE)
43# define AMBI_ENC_FRAME_SIZE ( FRAME_SIZE )
45# define AMBI_ENC_FRAME_SIZE ( 64 )
57typedef struct _ambi_enc
#define MAX_NUM_INPUTS
Maximum number of input channels supported.
SOURCE_CONFIG_PRESETS
Available source configurations presets to use for encoding/panning.
NORM_TYPES
Available Ambisonic normalisation conventions.
CH_ORDER
Available Ambisonic channel ordering conventions.
#define MAX_NUM_SH_SIGNALS
Maximum number of spherical harmonic components/signals supported.
SH_ORDERS
Available spherical harmonic (SH) input/output order options.
A basic Ambisonic encoder.
void loadSourceConfigPreset(SOURCE_CONFIG_PRESETS preset, float dirs_deg[MAX_NUM_INPUTS][2], int *nCH)
Returns the source directions for a specified source config preset.
#define AMBI_ENC_FRAME_SIZE
Framesize, in time-domain samples.
Main include header for the Spatial_Audio_Framework (SAF)
Include header for SAF externals.
Main structure for ambi_enc.
float tempFrame[MAX_NUM_SH_SIGNALS][AMBI_ENC_FRAME_SIZE]
Temporary frame.
float Y[MAX_NUM_SH_SIGNALS][MAX_NUM_INPUTS]
SH weights.
int enablePostScaling
Flag 1: output signals scaled by 1/sqrt(nSources), 0: disabled.
int new_nSources
New number of input signals (current value will be replaced by this after next re-init)
float interpolator_fadeIn[AMBI_ENC_FRAME_SIZE]
Linear Interpolator (fade-in)
float inputFrameTD[MAX_NUM_INPUTS][AMBI_ENC_FRAME_SIZE]
Input frame of signals.
CH_ORDER chOrdering
Ambisonic channel order convention (see CH_ORDER)
float tempFrame_fadeOut[MAX_NUM_SH_SIGNALS][AMBI_ENC_FRAME_SIZE]
Temporary frame with linear interpolation (fade-out) applied.
float outputFrameTD[MAX_NUM_SH_SIGNALS][AMBI_ENC_FRAME_SIZE]
Output frame of SH signals.
float prev_Y[MAX_NUM_SH_SIGNALS][MAX_NUM_INPUTS]
Previous SH weights.
int nSources
Current number of input signals.
float prev_inputFrameTD[MAX_NUM_INPUTS][AMBI_ENC_FRAME_SIZE]
Previous frame of signals.
NORM_TYPES norm
Ambisonic normalisation convention (see NORM_TYPES)
float src_gains[MAX_NUM_INPUTS]
Gains applied per source.
float fs
Host sampling rate.
SH_ORDERS order
Current SH encoding order.
int recalc_SH_FLAG[MAX_NUM_INPUTS]
Flags, 1: recalc SH weights, 0: do not.
float outputFrameTD_fadeIn[MAX_NUM_SH_SIGNALS][AMBI_ENC_FRAME_SIZE]
Output frame of SH signals with linear interpolation (fade-in) applied.
float src_dirs_deg[MAX_NUM_INPUTS][2]
Source directions, in degrees.
float interpolator_fadeOut[AMBI_ENC_FRAME_SIZE]
Linear Interpolator (fade-out)