| 181 | } |
| 182 | |
| 183 | smileres_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 | |
| 209 | smileres_t smile_abort(smileobj_t *smileobj) |
| 210 | { |
nothing calls this directly
no test coverage detected