SAF
Loading...
Searching...
No Matches
_common.h File Reference

A bunch of things that are common to many of the saf examples. More...

Go to the source code of this file.

Macros

#define MAX_SH_ORDER   ( 10 )
 Maximum supported Ambisonic order.
 
#define NUM_CH_ORDERINGS   ( 2 )
 Number of channel ordering options available.
 
#define NUM_NORM_TYPES   ( 3 )
 Number of normalisation options available.
 
#define NUM_STATIC_BEAM_TYPES   ( 3 )
 Number of available static beamformer types.
 
#define PROGRESSBARTEXT_CHAR_LENGTH   ( 256 )
 Length of progress bar string.
 
#define MAX_NUM_CHANNELS   ( 128 )
 Maximum number of input/output channels supported.
 
#define MAX_NUM_INPUTS   ( MAX_NUM_CHANNELS )
 Maximum number of input channels supported.
 
#define MAX_NUM_OUTPUTS   ( MAX_NUM_CHANNELS )
 Maximum number of output channels supported.
 
#define MAX_NUM_SH_SIGNALS   ( MAX_NUM_CHANNELS )
 Maximum number of spherical harmonic components/signals supported.
 

Typedefs

typedef CH_ORDER _Atomic_CH_ORDER
 
typedef NORM_TYPES _Atomic_NORM_TYPES
 
typedef SH_ORDERS _Atomic_SH_ORDERS
 
typedef MIC_PRESETS _Atomic_MIC_PRESETS
 
typedef LOUDSPEAKER_ARRAY_PRESETS _Atomic_LOUDSPEAKER_ARRAY_PRESETS
 
typedef SOURCE_CONFIG_PRESETS _Atomic_SOURCE_CONFIG_PRESETS
 
typedef STATIC_BEAM_TYPES _Atomic_STATIC_BEAM_TYPES
 
typedef HFOV_OPTIONS _Atomic_HFOV_OPTIONS
 
typedef ASPECT_RATIO_OPTIONS _Atomic_ASPECT_RATIO_OPTIONS
 
typedef CODEC_STATUS _Atomic_CODEC_STATUS
 
typedef PROC_STATUS _Atomic_PROC_STATUS
 

Enumerations

enum  SH_ORDERS {
  SH_ORDER_FIRST = 1 , SH_ORDER_SECOND , SH_ORDER_THIRD , SH_ORDER_FOURTH ,
  SH_ORDER_FIFTH , SH_ORDER_SIXTH , SH_ORDER_SEVENTH , SH_ORDER_EIGHTH ,
  SH_ORDER_NINTH , SH_ORDER_TENTH
}
 Available spherical harmonic (SH) input/output order options. More...
 
enum  CH_ORDER { CH_ACN = 1 , CH_FUMA }
 Available Ambisonic channel ordering conventions. More...
 
enum  NORM_TYPES { NORM_N3D = 1 , NORM_SN3D , NORM_FUMA }
 Available Ambisonic normalisation conventions. More...
 
enum  MIC_PRESETS { MIC_PRESET_IDEAL = 1 , MIC_PRESET_ZYLIA , MIC_PRESET_EIGENMIKE32 , MIC_PRESET_DTU_MIC }
 Available microphone array presets. More...
 
enum  LOUDSPEAKER_ARRAY_PRESETS {
  LOUDSPEAKER_ARRAY_PRESET_DEFAULT = 1 , LOUDSPEAKER_ARRAY_PRESET_STEREO , LOUDSPEAKER_ARRAY_PRESET_5PX , LOUDSPEAKER_ARRAY_PRESET_7PX ,
  LOUDSPEAKER_ARRAY_PRESET_8PX , LOUDSPEAKER_ARRAY_PRESET_9PX , LOUDSPEAKER_ARRAY_PRESET_10PX , LOUDSPEAKER_ARRAY_PRESET_11PX ,
  LOUDSPEAKER_ARRAY_PRESET_11PX_7_4 , LOUDSPEAKER_ARRAY_PRESET_13PX , LOUDSPEAKER_ARRAY_PRESET_22PX , LOUDSPEAKER_ARRAY_PRESET_22P2_9_10_3 ,
  LOUDSPEAKER_ARRAY_PRESET_AALTO_MCC , LOUDSPEAKER_ARRAY_PRESET_AALTO_MCC_SUBSET , LOUDSPEAKER_ARRAY_PRESET_AALTO_APAJA , LOUDSPEAKER_ARRAY_PRESET_AALTO_LR ,
  LOUDSPEAKER_ARRAY_PRESET_DTU_AVIL , LOUDSPEAKER_ARRAY_PRESET_ZYLIA_LAB , LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_4 , LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_12 ,
  LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_24 , LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_36 , LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_48 , LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_60 ,
  LOUDSPEAKER_ARRAY_PRESET_SPH_COV_9 , LOUDSPEAKER_ARRAY_PRESET_SPH_COV_16 , LOUDSPEAKER_ARRAY_PRESET_SPH_COV_25 , LOUDSPEAKER_ARRAY_PRESET_SPH_COV_49 ,
  LOUDSPEAKER_ARRAY_PRESET_SPH_COV_64
}
 Available loudspeaker array presets. More...
 
enum  SOURCE_CONFIG_PRESETS {
  SOURCE_CONFIG_PRESET_DEFAULT = 1 , SOURCE_CONFIG_PRESET_MONO , SOURCE_CONFIG_PRESET_STEREO , SOURCE_CONFIG_PRESET_5PX ,
  SOURCE_CONFIG_PRESET_7PX , SOURCE_CONFIG_PRESET_8PX , SOURCE_CONFIG_PRESET_9PX , SOURCE_CONFIG_PRESET_10PX ,
  SOURCE_CONFIG_PRESET_11PX , SOURCE_CONFIG_PRESET_11PX_7_4 , SOURCE_CONFIG_PRESET_13PX , SOURCE_CONFIG_PRESET_22PX ,
  SOURCE_CONFIG_PRESET_22P2_9_10_3 , SOURCE_CONFIG_PRESET_AALTO_MCC , SOURCE_CONFIG_PRESET_AALTO_MCC_SUBSET , SOURCE_CONFIG_PRESET_AALTO_APAJA ,
  SOURCE_CONFIG_PRESET_AALTO_LR , SOURCE_CONFIG_PRESET_DTU_AVIL , SOURCE_CONFIG_PRESET_ZYLIA_LAB , SOURCE_CONFIG_PRESET_T_DESIGN_4 ,
  SOURCE_CONFIG_PRESET_T_DESIGN_12 , SOURCE_CONFIG_PRESET_T_DESIGN_24 , SOURCE_CONFIG_PRESET_T_DESIGN_36 , SOURCE_CONFIG_PRESET_T_DESIGN_48 ,
  SOURCE_CONFIG_PRESET_T_DESIGN_60 , SOURCE_CONFIG_PRESET_SPH_COV_9 , SOURCE_CONFIG_PRESET_SPH_COV_16 , SOURCE_CONFIG_PRESET_SPH_COV_25 ,
  SOURCE_CONFIG_PRESET_SPH_COV_49 , SOURCE_CONFIG_PRESET_SPH_COV_64
}
 Available source configurations presets to use for encoding/panning. More...
 
enum  STATIC_BEAM_TYPES { STATIC_BEAM_TYPE_CARDIOID = 1 , STATIC_BEAM_TYPE_HYPERCARDIOID , STATIC_BEAM_TYPE_MAX_EV }
 Available static beamforming approaches. More...
 
enum  HFOV_OPTIONS { HFOV_360 = 1 , HFOV_180 , HFOV_90 , HFOV_60 }
 Available horizontal field-of-view (FOV) options. More...
 
enum  ASPECT_RATIO_OPTIONS { ASPECT_RATIO_2_1 = 1 , ASPECT_RATIO_16_9 , ASPECT_RATIO_4_3 }
 Available aspect ratios. More...
 
enum  CODEC_STATUS { CODEC_STATUS_INITIALISED = 0 , CODEC_STATUS_NOT_INITIALISED , CODEC_STATUS_INITIALISING }
 Current status of the codec. More...
 
enum  PROC_STATUS { PROC_STATUS_ONGOING = 0 , PROC_STATUS_NOT_ONGOING }
 Current status of the processing loop. More...
 

Detailed Description

A bunch of things that are common to many of the saf examples.

Author
Leo McCormack
Date
04.07.2020
License
ISC

Definition in file _common.h.

Macro Definition Documentation

◆ MAX_NUM_CHANNELS

#define MAX_NUM_CHANNELS   ( 128 )

Maximum number of input/output channels supported.

Definition at line 234 of file _common.h.

◆ MAX_NUM_INPUTS

#define MAX_NUM_INPUTS   ( MAX_NUM_CHANNELS )

Maximum number of input channels supported.

Definition at line 237 of file _common.h.

◆ MAX_NUM_OUTPUTS

#define MAX_NUM_OUTPUTS   ( MAX_NUM_CHANNELS )

Maximum number of output channels supported.

Definition at line 240 of file _common.h.

◆ MAX_NUM_SH_SIGNALS

#define MAX_NUM_SH_SIGNALS   ( MAX_NUM_CHANNELS )

Maximum number of spherical harmonic components/signals supported.

Definition at line 243 of file _common.h.

◆ MAX_SH_ORDER

#define MAX_SH_ORDER   ( 10 )

Maximum supported Ambisonic order.

Definition at line 56 of file _common.h.

◆ NUM_CH_ORDERINGS

#define NUM_CH_ORDERINGS   ( 2 )

Number of channel ordering options available.

Definition at line 70 of file _common.h.

◆ NUM_NORM_TYPES

#define NUM_NORM_TYPES   ( 3 )

Number of normalisation options available.

Definition at line 86 of file _common.h.

◆ NUM_STATIC_BEAM_TYPES

#define NUM_STATIC_BEAM_TYPES   ( 3 )

Number of available static beamformer types.

Definition at line 180 of file _common.h.

◆ PROGRESSBARTEXT_CHAR_LENGTH

#define PROGRESSBARTEXT_CHAR_LENGTH   ( 256 )

Length of progress bar string.

Definition at line 231 of file _common.h.

Typedef Documentation

◆ _Atomic_ASPECT_RATIO_OPTIONS

Definition at line 266 of file _common.h.

◆ _Atomic_CH_ORDER

Definition at line 258 of file _common.h.

◆ _Atomic_CODEC_STATUS

Definition at line 267 of file _common.h.

◆ _Atomic_HFOV_OPTIONS

Definition at line 265 of file _common.h.

◆ _Atomic_LOUDSPEAKER_ARRAY_PRESETS

◆ _Atomic_MIC_PRESETS

Definition at line 261 of file _common.h.

◆ _Atomic_NORM_TYPES

Definition at line 259 of file _common.h.

◆ _Atomic_PROC_STATUS

Definition at line 268 of file _common.h.

◆ _Atomic_SH_ORDERS

Definition at line 260 of file _common.h.

◆ _Atomic_SOURCE_CONFIG_PRESETS

◆ _Atomic_STATIC_BEAM_TYPES

Definition at line 264 of file _common.h.

Enumeration Type Documentation

◆ ASPECT_RATIO_OPTIONS

Available aspect ratios.

Enumerator
ASPECT_RATIO_2_1 

ASPECT_RATIO_2_1 - 2:1.

ASPECT_RATIO_16_9 

ASPECT_RATIO_16_9 - 16:9.

ASPECT_RATIO_4_3 

ASPECT_RATIO_4_3 - 4:3.

Definition at line 192 of file _common.h.

◆ CH_ORDER

enum CH_ORDER

Available Ambisonic channel ordering conventions.

Warning
CH_FUMA is only supported for first order input!
Enumerator
CH_ACN 

Ambisonic Channel Numbering (ACN)

CH_FUMA 

(Legacy) Furse-Malham/B-format (WXYZ)

Definition at line 63 of file _common.h.

◆ CODEC_STATUS

Current status of the codec.

These can be used to find out whether the codec is initialised, currently in the process of intialising, or it is not yet initialised.

Enumerator
CODEC_STATUS_INITIALISED 

Codec is initialised and ready to process input audio.

CODEC_STATUS_NOT_INITIALISED 

Codec has not yet been initialised, or the codec configuration has changed.

Input audio should not be processed.

CODEC_STATUS_INITIALISING 

Codec is currently being initialised, input audio should not be processed.

Definition at line 205 of file _common.h.

◆ HFOV_OPTIONS

Available horizontal field-of-view (FOV) options.

Enumerator
HFOV_360 

360 degrees

HFOV_180 

180 degrees

HFOV_90 

90 degrees

HFOV_60 

60 degrees

Definition at line 183 of file _common.h.

◆ LOUDSPEAKER_ARRAY_PRESETS

Available loudspeaker array presets.

Definition at line 103 of file _common.h.

◆ MIC_PRESETS

Available microphone array presets.

These determine the frequency ranges where the microphone array provides usable spherical harmonic components at each order.

Definition at line 94 of file _common.h.

◆ NORM_TYPES

enum NORM_TYPES

Available Ambisonic normalisation conventions.

Warning
NORM_FUMA is only supported for first order input! It also has the 1/sqrt(2) scaling term applied to the omni.
Enumerator
NORM_N3D 

orthonormalised (N3D)

NORM_SN3D 

Schmidt semi-normalisation (SN3D)

NORM_FUMA 

(Legacy) Furse-Malham scaling

Definition at line 78 of file _common.h.

◆ PROC_STATUS

Current status of the processing loop.

These are used to keep things thread-safe. i.e., the codec will not be initialised if the currently configured codec is being used to process a block of audio. Likewise, if the codec is being initialised, then the "process" functions are bypassed.

Enumerator
PROC_STATUS_ONGOING 

Codec is processing input audio, and should not be reinitialised at this time.

PROC_STATUS_NOT_ONGOING 

Codec is not processing input audio, and may be reinitialised if needed.

Definition at line 223 of file _common.h.

◆ SH_ORDERS

enum SH_ORDERS

Available spherical harmonic (SH) input/output order options.

Enumerator
SH_ORDER_FIRST 

First-order (4 channels)

SH_ORDER_SECOND 

Second-order (9 channels)

SH_ORDER_THIRD 

Third-order (16 channels)

SH_ORDER_FOURTH 

Fourth-order (25 channels)

SH_ORDER_FIFTH 

Fifth-order (36 channels)

SH_ORDER_SIXTH 

Sixth-order (49 channels)

SH_ORDER_SEVENTH 

Seventh-order (64 channels)

SH_ORDER_EIGHTH 

Eighth-order (81 channels)

SH_ORDER_NINTH 

Ninth-order (100 channels)

SH_ORDER_TENTH 

Tenth-order (121 channels)

Definition at line 42 of file _common.h.

◆ SOURCE_CONFIG_PRESETS

Available source configurations presets to use for encoding/panning.

Definition at line 137 of file _common.h.

◆ STATIC_BEAM_TYPES

Available static beamforming approaches.

Enumerator
STATIC_BEAM_TYPE_CARDIOID 

cardioid

STATIC_BEAM_TYPE_HYPERCARDIOID 

hyper-cardioid

STATIC_BEAM_TYPE_MAX_EV 

hyper-cardioid with max_rE weighting

Definition at line 172 of file _common.h.