| 292 | } |
| 293 | |
| 294 | smileres_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 | |
| 318 | smileres_t smile_extsource_set_external_eoi(smileobj_t *smileobj, const char *componentName) |
| 319 | { |
nothing calls this directly
no test coverage detected