SAF
Loading...
Searching...
No Matches
_common.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Leo McCormack
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 * PERFORMANCE OF THIS SOFTWARE.
15 */
16
26#ifndef __COMMON_H_INCLUDED__
27#define __COMMON_H_INCLUDED__
28
29#ifdef __cplusplus
30extern "C" {
31#endif /* __cplusplus */
32
33/* ========================================================================== */
34/* Presets + Constants */
35/* ========================================================================== */
36
50
52#define MAX_SH_ORDER ( 10 )
53
59typedef enum {
60 CH_ACN = 1,
61 CH_FUMA
64
66#define NUM_CH_ORDERINGS ( 2 )
67
80
82#define NUM_NORM_TYPES ( 3 )
83
90typedef enum {
91 MIC_PRESET_IDEAL = 1,
92 MIC_PRESET_ZYLIA,
93 MIC_PRESET_EIGENMIKE32,
94 MIC_PRESET_DTU_MIC
95
97
99typedef enum {
100 LOUDSPEAKER_ARRAY_PRESET_DEFAULT = 1,
101 LOUDSPEAKER_ARRAY_PRESET_STEREO,
102 LOUDSPEAKER_ARRAY_PRESET_5PX,
103 LOUDSPEAKER_ARRAY_PRESET_7PX,
104 LOUDSPEAKER_ARRAY_PRESET_8PX,
105 LOUDSPEAKER_ARRAY_PRESET_9PX,
106 LOUDSPEAKER_ARRAY_PRESET_10PX,
107 LOUDSPEAKER_ARRAY_PRESET_11PX,
108 LOUDSPEAKER_ARRAY_PRESET_11PX_7_4,
109 LOUDSPEAKER_ARRAY_PRESET_13PX,
110 LOUDSPEAKER_ARRAY_PRESET_22PX,
111 LOUDSPEAKER_ARRAY_PRESET_22P2_9_10_3,
112 LOUDSPEAKER_ARRAY_PRESET_AALTO_MCC,
113 LOUDSPEAKER_ARRAY_PRESET_AALTO_MCC_SUBSET,
114 LOUDSPEAKER_ARRAY_PRESET_AALTO_APAJA,
115 LOUDSPEAKER_ARRAY_PRESET_AALTO_LR,
116 LOUDSPEAKER_ARRAY_PRESET_DTU_AVIL,
117 LOUDSPEAKER_ARRAY_PRESET_ZYLIA_LAB,
118 LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_4,
119 LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_12,
120 LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_24,
121 LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_36,
122 LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_48,
123 LOUDSPEAKER_ARRAY_PRESET_T_DESIGN_60,
124 LOUDSPEAKER_ARRAY_PRESET_SPH_COV_9,
125 LOUDSPEAKER_ARRAY_PRESET_SPH_COV_16,
126 LOUDSPEAKER_ARRAY_PRESET_SPH_COV_25,
127 LOUDSPEAKER_ARRAY_PRESET_SPH_COV_49,
128 LOUDSPEAKER_ARRAY_PRESET_SPH_COV_64
129
131
133typedef enum {
134 SOURCE_CONFIG_PRESET_DEFAULT = 1,
135 SOURCE_CONFIG_PRESET_MONO,
136 SOURCE_CONFIG_PRESET_STEREO,
137 SOURCE_CONFIG_PRESET_5PX,
138 SOURCE_CONFIG_PRESET_7PX,
139 SOURCE_CONFIG_PRESET_8PX,
140 SOURCE_CONFIG_PRESET_9PX,
141 SOURCE_CONFIG_PRESET_10PX,
142 SOURCE_CONFIG_PRESET_11PX,
143 SOURCE_CONFIG_PRESET_11PX_7_4,
144 SOURCE_CONFIG_PRESET_13PX,
145 SOURCE_CONFIG_PRESET_22PX,
146 SOURCE_CONFIG_PRESET_22P2_9_10_3,
147 SOURCE_CONFIG_PRESET_AALTO_MCC,
148 SOURCE_CONFIG_PRESET_AALTO_MCC_SUBSET,
149 SOURCE_CONFIG_PRESET_AALTO_APAJA,
150 SOURCE_CONFIG_PRESET_AALTO_LR,
151 SOURCE_CONFIG_PRESET_DTU_AVIL,
152 SOURCE_CONFIG_PRESET_ZYLIA_LAB,
153 SOURCE_CONFIG_PRESET_T_DESIGN_4,
154 SOURCE_CONFIG_PRESET_T_DESIGN_12,
155 SOURCE_CONFIG_PRESET_T_DESIGN_24,
156 SOURCE_CONFIG_PRESET_T_DESIGN_36,
157 SOURCE_CONFIG_PRESET_T_DESIGN_48,
158 SOURCE_CONFIG_PRESET_T_DESIGN_60,
159 SOURCE_CONFIG_PRESET_SPH_COV_9,
160 SOURCE_CONFIG_PRESET_SPH_COV_16,
161 SOURCE_CONFIG_PRESET_SPH_COV_25,
162 SOURCE_CONFIG_PRESET_SPH_COV_49,
163 SOURCE_CONFIG_PRESET_SPH_COV_64
164
166
174
176#define NUM_STATIC_BEAM_TYPES ( 3 )
177
186
194
210
225
227#define PROGRESSBARTEXT_CHAR_LENGTH ( 256 )
228
230#define MAX_NUM_CHANNELS ( 128 )
231
233#define MAX_NUM_INPUTS ( MAX_NUM_CHANNELS )
234
236#define MAX_NUM_OUTPUTS ( MAX_NUM_CHANNELS )
237
239#define MAX_NUM_SH_SIGNALS ( MAX_NUM_CHANNELS )
240
241
242#ifdef __cplusplus
243} /* extern "C" { */
244#endif /* __cplusplus */
245
246#endif /* __COMMON_H_INCLUDED__ */
STATIC_BEAM_TYPES
Available static beamforming approaches.
Definition _common.h:168
@ STATIC_BEAM_TYPE_MAX_EV
hyper-cardioid with max_rE weighting
Definition _common.h:171
@ STATIC_BEAM_TYPE_HYPERCARDIOID
hyper-cardioid
Definition _common.h:170
@ STATIC_BEAM_TYPE_CARDIOID
cardioid
Definition _common.h:169
LOUDSPEAKER_ARRAY_PRESETS
Available loudspeaker array presets.
Definition _common.h:99
SOURCE_CONFIG_PRESETS
Available source configurations presets to use for encoding/panning.
Definition _common.h:133
PROC_STATUS
Current status of the processing loop.
Definition _common.h:219
@ PROC_STATUS_ONGOING
Codec is processing input audio, and should not be reinitialised at this time.
Definition _common.h:220
@ PROC_STATUS_NOT_ONGOING
Codec is not processing input audio, and may be reinitialised if needed.
Definition _common.h:222
HFOV_OPTIONS
Available horizontal field-of-view (FOV) options.
Definition _common.h:179
@ HFOV_60
60 degrees
Definition _common.h:183
@ HFOV_360
360 degrees
Definition _common.h:180
@ HFOV_180
180 degrees
Definition _common.h:181
@ HFOV_90
90 degrees
Definition _common.h:182
NORM_TYPES
Available Ambisonic normalisation conventions.
Definition _common.h:74
@ NORM_SN3D
Schmidt semi-normalisation (SN3D)
Definition _common.h:76
@ NORM_FUMA
(Legacy) Furse-Malham scaling
Definition _common.h:77
@ NORM_N3D
orthonormalised (N3D)
Definition _common.h:75
MIC_PRESETS
Available microphone array presets.
Definition _common.h:90
CH_ORDER
Available Ambisonic channel ordering conventions.
Definition _common.h:59
@ CH_ACN
Ambisonic Channel Numbering (ACN)
Definition _common.h:60
@ CH_FUMA
(Legacy) Furse-Malham/B-format (WXYZ)
Definition _common.h:61
SH_ORDERS
Available spherical harmonic (SH) input/output order options.
Definition _common.h:38
@ SH_ORDER_SECOND
Second-order (9 channels)
Definition _common.h:40
@ SH_ORDER_FOURTH
Fourth-order (25 channels)
Definition _common.h:42
@ SH_ORDER_FIRST
First-order (4 channels)
Definition _common.h:39
@ SH_ORDER_THIRD
Third-order (16 channels)
Definition _common.h:41
@ SH_ORDER_FIFTH
Fifth-order (36 channels)
Definition _common.h:43
@ SH_ORDER_EIGHTH
Eighth-order (81 channels)
Definition _common.h:46
@ SH_ORDER_NINTH
Ninth-order (100 channels)
Definition _common.h:47
@ SH_ORDER_TENTH
Tenth-order (121 channels)
Definition _common.h:48
@ SH_ORDER_SIXTH
Sixth-order (49 channels)
Definition _common.h:44
@ SH_ORDER_SEVENTH
Seventh-order (64 channels)
Definition _common.h:45
CODEC_STATUS
Current status of the codec.
Definition _common.h:201
@ CODEC_STATUS_NOT_INITIALISED
Codec has not yet been initialised, or the codec configuration has changed.
Definition _common.h:204
@ CODEC_STATUS_INITIALISED
Codec is initialised and ready to process input audio.
Definition _common.h:202
@ CODEC_STATUS_INITIALISING
Codec is currently being initialised, input audio should not be processed.
Definition _common.h:207
ASPECT_RATIO_OPTIONS
Available aspect ratios.
Definition _common.h:188
@ ASPECT_RATIO_4_3
ASPECT_RATIO_4_3 - 4:3.
Definition _common.h:191
@ ASPECT_RATIO_16_9
ASPECT_RATIO_16_9 - 16:9.
Definition _common.h:190
@ ASPECT_RATIO_2_1
ASPECT_RATIO_2_1 - 2:1.
Definition _common.h:189