50 std::string pointsNames[MAX_POINTS_COUNT];
51 std::vector< std::vector<float> > gains;
59 std::vector<Mach1Point3D> getChannelPoints();
60 std::vector< std::vector<float> > getGains();
61 std::vector<std::string> getChannelPointsNames();
62 std::vector<float> getGainsForInputChannelByName(std::string pointName);
87 OUTPUT_SPATIAL_4CH = (int)0,
93 MODE_ISOTROPICLINEAR = (int)0,
94 MODE_ISOTROPICEQUALPOWER,
102 std::vector<InputModeName> inputModeNames = {
104 {INPUT_STEREO,
"2.0_C"},
105 {INPUT_LCR,
"3.0_LCR"},
106 {INPUT_QUAD,
"4.0_Quad"},
107 {INPUT_LCRS,
"4.0_LCRS"},
108 {INPUT_AFORMAT,
"4.0_AFormat"},
109 {INPUT_FIVE_ZERO,
"5.0_C"},
114 {INPUT_1OAFUMA,
"FuMa"},
115 {INPUT_2OAACN,
"ACNSN3DO2A"},
116 {INPUT_2OAFUMA,
"FuMaO2A"},
117 {INPUT_3OAACN,
"FuMaO3A"},
118 {INPUT_3OAFUMA,
"ACNSN3DO3A"},
125 std::vector<OutputModeName> outputModeNames = {
126 {OUTPUT_SPATIAL_4CH,
"M1Spatial-4"},
127 {OUTPUT_SPATIAL_8CH,
"M1Spatial-8"},
128 {OUTPUT_SPATIAL_14CH,
"M1Spatial-14"},
133 float **arr_Gains =
nullptr;
134 char **arr_PointsNames =
nullptr;
135 float *arr_GainsForInputChannelNamed =
nullptr;
136 float *arr_ResultingCoeffsDecoded =
nullptr;
140 OutputMode outputMode;
141 PannerMode pannerMode;
143 float azimuth, diverge, elevation;
144 float orbitRotation, sSpread;
146 bool frontSurroundPerspective;
147 float outputGainLinearMultipler;
148 bool gainCompensationActive =
false;
149 float gainCompensationLinearMultiplier = 1.0f;
151 float clamp(
float n,
float lower,
float upper);
152 void assignResultingPointsNamesAndCoordinates(
const std::vector<std::string> &names,
const std::vector<Mach1Point3D> &pnts);
153 float getCoeffForChannelPoint(
float x,
float y,
float z,
Mach1Point3D point,
bool ignoreZ);
154 void processGains(
float x,
float y,
float z, std::vector<float> &result);
157 long timeLastCalculation;
166 void generatePointResults();
169#ifdef M1ENCODE_INLINE_DECODE
170 void getResultingCoeffsDecoded(Mach1DecodeMode decodeMode,
float *decodeResult,
float *result);
174 OutputMode getOutputMode();
175 PannerMode getPannerMode();
177 int getInputChannelsCount();
178 int getOutputChannelsCount();
180 int getInputModeFromString(std::string name);
181 int getOutputModeFromString(std::string name);
184 void setOutputMode(OutputMode outputMode);
185 void setAzimuth(
float azimuthFromMinus1To1);
186 void setAzimuthDegrees(
float azimuthDegrees);
187 void setAzimuthRadians(
float azimuthRadians);
188 void setDiverge(
float divergeFromMinus1To1);
189 void setElevation(
float elevationFromMinus1to1);
190 void setElevationDegrees(
float elevationFromMinus90to90);
191 void setElevationRadians(
float elevationFromMinusHalfPItoHalfPI);
192 void setIsotropicEncode(
bool isotropicEncode);
193 void setPannerMode(PannerMode pannerMode);
194 void setFrontSurroundPerspective(
bool frontSurroundPerspective);
196 float getOutputGain(
bool isDecibel);
197 void setOutputGain(
float outputGainMultipler,
bool isDecibel);
199 void setAutoOrbit(
bool autoOrbit);
200 void setOrbitRotation(
float orbitRotationFromMinusOnetoOne);
201 void setOrbitRotationDegrees(
float orbitRotationDegrees);
202 void setOrbitRotationRadians(
float orbitRotationRadians);
203 void setStereoSpread(
float sSpreadFrom0to1);
205 long getCurrentTime();
206 long getLastCalculationTime();
208 float getGainCompensation(
bool isDecibel);
209 bool getGainCompensationActive();
210 void setGainCompensationActive(
bool active);