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

Function smile_extaudiosource_write_data

progsrc/smileapi/SMILEapi.cpp:342–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342smileres_t smile_extaudiosource_write_data(smileobj_t *smileobj, const char *componentName, const void *data, int length)
343{
344 if (smileobj == NULL)
345 SMILE_FAIL_WITH(SMILE_INVALID_ARG, "smileobj argument must not be null");
346 if (componentName == NULL)
347 SMILE_FAIL_WITH(SMILE_INVALID_ARG, "componentName argument must not be null");
348 if (data == NULL)
349 SMILE_FAIL_WITH(SMILE_INVALID_ARG, "data argument must not be null");
350 if (smileobj->state == SMILE_UNINITIALIZED)
351 SMILE_FAIL_WITH(SMILE_INVALID_STATE, "openSMILE must be initialized first");
352
353 cSmileComponent *component = smileobj->cMan->getComponentInstance(componentName);
354
355 if (component == NULL)
356 SMILE_FAIL_WITH(SMILE_COMP_NOT_FOUND, "specified component does not exist");
357
358 cExternalAudioSource *externalAudioSource = dynamic_cast<cExternalAudioSource*>(component);
359
360 if (externalAudioSource == NULL)
361 SMILE_FAIL_WITH(SMILE_COMP_NOT_FOUND, "specified component is not of type cExternalAudioSource");
362
363 return externalAudioSource->writeData(data, length) ? SMILE_SUCCESS : SMILE_NOT_WRITTEN;
364}
365
366smileres_t smile_extaudiosource_set_external_eoi(smileobj_t *smileobj, const char *componentName)
367{

Callers

nothing calls this directly

Calls 2

getComponentInstanceMethod · 0.45
writeDataMethod · 0.45

Tested by

no test coverage detected