MCPcopy Create free account
hub / github.com/audeering/opensmile / dataProcessorCustomFinalise

Method dataProcessorCustomFinalise

src/core/vecToWinProcessor.cpp:232–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230
231
232int cVecToWinProcessor::dataProcessorCustomFinalise()
233{
234 //No = Nfi;
235 // window functions
236 const char * windowA = getStr("windowA");
237 const char * windowB = getStr("windowB");
238
239 if (windowA != NULL) {
240 const char * tpA = getComponentInstanceType(windowA);
241 cSmileComponent * winA = getComponentInstance(windowA);
242
243 if (winA != NULL && tpA != NULL) {
244 if (strcmp(tpA,"cWindower")) { // !!strcmp ...
245 SMILE_IERR(1,"The component '%s' (specified via the 'windowA' option) is not of type cWindower (it is of type '%s')! Please check your config!",windowA,tpA);
246 } else {
247 ptrWinA = (cWindower *)winA;
248 }
249 } else {
250 SMILE_IERR(1,"The component '%s' was not found in the current config!",windowA);
251 }
252 }
253
254 if (windowB != NULL) {
255 const char * tpB = getComponentInstanceType(windowB);
256 cSmileComponent * winB = getComponentInstance(windowB);
257
258 if (winB != NULL && tpB != NULL) {
259 if (strcmp(tpB,"cWindower")) { // !!strcmp ...
260 SMILE_IERR(1,"The component '%s' (specified via the 'windowB' option) is not of type cWindower (it is of type '%s')! Please check your config!",windowB,tpB);
261 } else {
262 ptrWinB = (cWindower *)winB;
263 }
264 } else {
265 SMILE_IERR(1,"The component '%s' was not found in the current config!",windowB);
266 }
267 }
268
269 // before we do any actions, we must check if the windower configs have been finalised and the window function is available (if normaliseAdd is activated), otherwise we must delay our finalise
270 if (normaliseAdd && (ptrWinA != NULL || ptrWinB != NULL)) {
271 if ( (ptrWinA == NULL || ptrWinA->isFinalised()) && (ptrWinB == NULL || ptrWinB->isFinalised()) ) {
272
273 } else {
274 // at least one windower is not yet ready...
275 return 0;
276 }
277 } else {
278 normaliseAdd = 0;
279 }
280
281 Nfi = reader_->getLevelNf();
282 if (!processArrayFields) { Nfi = 1; }
283
284 ola = (struct sVecToWinProcessorOla*)calloc(1,sizeof(struct sVecToWinProcessorOla)*Nfi);
285
286 const FrameMetaInfo * fm = reader_->getFrameMetaInfo();
287 const sDmLevelConfig *cfg = reader_->getLevelConfig();
288 samplePeriod = cfg->basePeriod; // ???
289 inputPeriod = cfg->T;

Callers

nothing calls this directly

Calls 6

isFinalisedMethod · 0.80
getLevelNfMethod · 0.45
getFrameMetaInfoMethod · 0.45
getLevelConfigMethod · 0.45
getLevelNMethod · 0.45
getFieldNameMethod · 0.45

Tested by

no test coverage detected