Audio Core Feature Interface Reference Manual  jpl-r3.19.1
aftr_sd.h File Reference

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_SAFTR_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...
 

Detailed Description

Core feature-lib for sound detection.

Function Documentation

INT32 AFTR_SD_checkParam ( const AFTR_SD_PARAM_S param)

Check sound detection parameters is valid or not.

Parameters
[in]paramPointer to sound detection parameters.
Returns
The execution result.
Return values
0success.
-EFAULTinput pointer is NULL.
-EINVALsound detection parameters is invalid.
See also
AFTR_SD_setParam()
AFTR_SD_getParam()
INT32 AFTR_SD_deleteInstance ( AFTR_SD_INSTANCE_S **  instance)

Delete sound detection instance.

Parameters
[in]instancePointer to pointer to sound detection instance.
Returns
The execution result.
Return values
0success.
-EFAULTpointer of sound detection instance is NULL.
See also
AFTR_SD_newInstance()
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.

Parameters
[in]rawraw audio bits.
[out]statussd status.
See also
none
Return values
MPI_SUCCESSsuccess.
-EFAULTinput pointer is NULL.
INT32 AFTR_SD_getParam ( AFTR_SD_INSTANCE_S instance,
AFTR_SD_PARAM_S param 
)

Get sound detection parameters.

Parameters
[in]instancePointer to sound detection instance.
[out]paramPointer to sound detection parameters.
Returns
The execution result.
Return values
0success.
-EFAULTinput pointer is NULL.
See also
AFTR_SD_setParam()
AFTR_SD_checkParam()
INT32 AFTR_SD_getStat ( AFTR_SD_INSTANCE_S instance,
AFTR_SD_STATUS_S status 
)

Get sound detection detected result.

Parameters
[in]instancePointer to sound detection instance.
[out]statusPointer to sound detection detected result.
Returns
The execution result.
Return values
0success.
-EFAULTinput pointer is NULL.
See also
None.
AFTR_SD_INSTANCE_S* AFTR_SD_newInstance ( )

Create sound detection instance.

Returns
The pointer of sound detection instance.
Return values
NULLfail to create instance
Not NULLsuccess to create instance
See also
AFTR_SD_deleteInstance()
INT32 AFTR_SD_reset ( AFTR_SD_INSTANCE_S instance)

Initialize sound detection instance value.

Parameters
[in,out]instancesound detection instance.
Returns
The execution result.
Return values
0Success.
INT32 AFTR_SD_setParam ( AFTR_SD_INSTANCE_S instance,
const AFTR_SD_PARAM_S param 
)

Set sound detection parameters.

Parameters
[in]instancePointer to sound detection instance.
[in]paramPointer to sound detection parameters.
Returns
The execution result.
Return values
0success.
-EFAULTinput pointer is NULL.
See also
AFTR_SD_checkParam()
AFTR_SD_getParam()