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

Function smile_run

progsrc/smileapi/SMILEapi.cpp:183–207  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183smileres_t smile_run(smileobj_t *smileobj)
184{
185 if (smileobj == NULL)
186 SMILE_FAIL_WITH(SMILE_INVALID_ARG, "smileobj argument must not be null");
187 if (smileobj->state != SMILE_INITIALIZED)
188 SMILE_FAIL_WITH(SMILE_INVALID_STATE, "openSMILE must be initialized first");
189
190 // smile_run is very likely getting called from a dedicated thread,
191 // so we need to set the global logger for it
192 smileobj->logger->useForCurrentThread();
193
194 smile_set_state(smileobj, SMILE_RUNNING);
195
196 try {
197 smileobj->cMan->runMultiThreaded(-1);
198 } catch (const cSMILException& ex) {
199 SMILE_FAIL_WITH(SMILE_FAIL, ex.getText());
200 } catch (...) {
201 SMILE_FAIL_WITH(SMILE_FAIL, "Unknown exception");
202 }
203
204 smile_set_state(smileobj, SMILE_ENDED);
205
206 return SMILE_SUCCESS;
207}
208
209smileres_t smile_abort(smileobj_t *smileobj)
210{

Callers

nothing calls this directly

Calls 4

smile_set_stateFunction · 0.85
useForCurrentThreadMethod · 0.80
runMultiThreadedMethod · 0.80
getTextMethod · 0.80

Tested by

no test coverage detected