Core feature-lib for sound detection. More...
Data Structures | |
| struct | AFTR_SD_PARAM_S |
| Struct for sound detection parameter. More... | |
| struct | AFTR_SD_STATUS_S |
| Struct for sd status. More... | |
| struct | AFTR_SD_INSTANCE_S |
| Struct for sound detection instance. More... | |
Functions | |
| AFTR_SD_INSTANCE_S * | AFTR_SD_newInstance () |
| Create sound detection instance. More... | |
| INT32 | AFTR_SD_deleteInstance (AFTR_SD_INSTANCE_S **instance) |
| Delete sound detection instance. More... | |
| INT32 | AFTR_SD_setParam (AFTR_SD_INSTANCE_S *instance, const AFTR_SD_PARAM_S *param) |
| Set sound detection parameters. More... | |
| INT32 | AFTR_SD_checkParam (const AFTR_SD_PARAM_S *param) |
| Check sound detection parameters is valid or not. More... | |
| INT32 | AFTR_SD_getParam (AFTR_SD_INSTANCE_S *instance, AFTR_SD_PARAM_S *param) |
| Get sound detection parameters. More... | |
| INT32 | AFTR_SD_detect (AFTR_SD_INSTANCE_S *instance, const char *raw_buffer, int size_of_raw, AFTR_SD_STATUS_S *status) |
| Calculate volume and detect loud sound. More... | |
| INT32 | AFTR_SD_getStat (AFTR_SD_INSTANCE_S *instance, AFTR_SD_STATUS_S *status) |
| Get sound detection detected result. More... | |
| INT32 | AFTR_SD_reset (AFTR_SD_INSTANCE_S *instance) |
| Initialize sound detection instance value. More... | |
Core feature-lib for sound detection.
| INT32 AFTR_SD_checkParam | ( | const AFTR_SD_PARAM_S * | param | ) |
Check sound detection parameters is valid or not.
| [in] | param | Pointer to sound detection parameters. |
| 0 | success. |
| -EFAULT | input pointer is NULL. |
| -EINVAL | sound detection parameters is invalid. |
| INT32 AFTR_SD_deleteInstance | ( | AFTR_SD_INSTANCE_S ** | instance | ) |
Delete sound detection instance.
| [in] | instance | Pointer to pointer to sound detection instance. |
| 0 | success. |
| -EFAULT | pointer of sound detection instance is NULL. |
| INT32 AFTR_SD_detect | ( | AFTR_SD_INSTANCE_S * | instance, |
| const char * | raw_buffer, | ||
| int | size_of_raw, | ||
| AFTR_SD_STATUS_S * | status | ||
| ) |
Calculate volume and detect loud sound.
| [in] | raw | raw audio bits. |
| [out] | status | sd status. |
| MPI_SUCCESS | success. |
| -EFAULT | input pointer is NULL. |
| INT32 AFTR_SD_getParam | ( | AFTR_SD_INSTANCE_S * | instance, |
| AFTR_SD_PARAM_S * | param | ||
| ) |
Get sound detection parameters.
| [in] | instance | Pointer to sound detection instance. |
| [out] | param | Pointer to sound detection parameters. |
| 0 | success. |
| -EFAULT | input pointer is NULL. |
| INT32 AFTR_SD_getStat | ( | AFTR_SD_INSTANCE_S * | instance, |
| AFTR_SD_STATUS_S * | status | ||
| ) |
Get sound detection detected result.
| [in] | instance | Pointer to sound detection instance. |
| [out] | status | Pointer to sound detection detected result. |
| 0 | success. |
| -EFAULT | input pointer is NULL. |
| AFTR_SD_INSTANCE_S* AFTR_SD_newInstance | ( | ) |
Create sound detection instance.
| NULL | fail to create instance |
| Not NULL | success to create instance |
| INT32 AFTR_SD_reset | ( | AFTR_SD_INSTANCE_S * | instance | ) |
Initialize sound detection instance value.
| [in,out] | instance | sound detection instance. |
| 0 | Success. |
| INT32 AFTR_SD_setParam | ( | AFTR_SD_INSTANCE_S * | instance, |
| const AFTR_SD_PARAM_S * | param | ||
| ) |
Set sound detection parameters.
| [in] | instance | Pointer to sound detection instance. |
| [in] | param | Pointer to sound detection parameters. |
| 0 | success. |
| -EFAULT | input pointer is NULL. |