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

Function smile_extsource_write_data

progsrc/smileapi/SMILEapi.cpp:294–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292}
293
294smileres_t smile_extsource_write_data(smileobj_t *smileobj, const char *componentName, const FLOAT_DMEM *data, int nFrames)
295{
296 if (smileobj == NULL)
297 SMILE_FAIL_WITH(SMILE_INVALID_ARG, "smileobj argument must not be null");
298 if (componentName == NULL)
299 SMILE_FAIL_WITH(SMILE_INVALID_ARG, "componentName argument must not be null");
300 if (data == NULL)
301 SMILE_FAIL_WITH(SMILE_INVALID_ARG, "data argument must not be null");
302 if (smileobj->state == SMILE_UNINITIALIZED)
303 SMILE_FAIL_WITH(SMILE_INVALID_STATE, "openSMILE must be initialized first");
304
305 cSmileComponent *component = smileobj->cMan->getComponentInstance(componentName);
306
307 if (component == NULL)
308 SMILE_FAIL_WITH(SMILE_COMP_NOT_FOUND, "specified component does not exist");
309
310 cExternalSource *externalSource = dynamic_cast<cExternalSource*>(component);
311
312 if (externalSource == NULL)
313 SMILE_FAIL_WITH(SMILE_COMP_NOT_FOUND, "specified component is not of type cExternalSource");
314
315 return externalSource->writeData(data, nFrames) ? SMILE_SUCCESS : SMILE_NOT_WRITTEN;
316}
317
318smileres_t smile_extsource_set_external_eoi(smileobj_t *smileobj, const char *componentName)
319{

Callers

nothing calls this directly

Calls 2

getComponentInstanceMethod · 0.45
writeDataMethod · 0.45

Tested by

no test coverage detected