AudioScience HPI Version_4.24.1
Functions

Silence Detector Controls

Controls

The silence detector control monitors its input for silence exceeding a set duration. More...

Functions

hpi_err_t HPI_SilenceDetector_GetState (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *state)
 Get the State of a SilenceDetector control.
hpi_err_t HPI_SilenceDetector_SetEnable (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t enable)
 Enable a SilenceDetector control.
hpi_err_t HPI_SilenceDetector_GetEnable (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *enable)
 Get the Enable setting of a SilenceDetector control.
hpi_err_t HPI_SilenceDetector_SetEventEnable (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t EventEnable)
 Set the event generation by a SilenceDetector control.
hpi_err_t HPI_SilenceDetector_GetEventEnable (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *EventEnable)
 Get the event generation enable setting of a SilenceDetector control.
hpi_err_t HPI_SilenceDetector_SetDelay (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t delay)
 Set the Delay of a SilenceDetector control.
hpi_err_t HPI_SilenceDetector_GetDelay (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *delay)
 Get the trigger delay of a SilenceDetector control.
hpi_err_t HPI_SilenceDetector_SetThreshold (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, int threshold)
 Set the Threshold of a SilenceDetector control.
hpi_err_t HPI_SilenceDetector_GetThreshold (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, int *threshold)
 Get the Threshold of a SilenceDetector control.

Detailed Description

The silence detector control monitors its input for silence exceeding a set duration.

Silence is defined as signal below a specified threshold set by HPI_SilenceDetector_SetThreshold() The duration is specified by HPI_SilenceDetector_SetDelay() silence-detected state is reset immediately the signal exceeds the threshold (no delay)


Function Documentation

hpi_err_t HPI_SilenceDetector_GetState ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  state 
)

Get the State of a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
*stateThe state is a bitmap corresponding to the channels being monitored (LSB=left channel, LSB+1=right channel)
Returns:
0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_SilenceDetector_SetEnable ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t  enable 
)

Enable a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
*enable1=enable, 0=disable
Returns:
0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_SilenceDetector_GetEnable ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  enable 
)

Get the Enable setting of a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
enable1=enable, 0=disable
Returns:
0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_SilenceDetector_SetEventEnable ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t  EventEnable 
)

Set the event generation by a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
EventEnable1=enable, 0=disable
Returns:
0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_SilenceDetector_GetEventEnable ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  EventEnable 
)

Get the event generation enable setting of a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
*EventEnable1=enable, 0=disable
Returns:
0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_SilenceDetector_SetDelay ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t  delay 
)

Set the Delay of a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
delayTrigger delay in milliseconds, max 60000 (60 seconds)
Returns:
0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_SilenceDetector_GetDelay ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  delay 
)

Get the trigger delay of a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
*delaysee HPI_SilenceDetector_SetDelay()
Returns:
0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_SilenceDetector_SetThreshold ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
int  threshold 
)

Set the Threshold of a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
thresholdin millibels wrt full scale. E.g. -4000 -> -40dBFS threshold.
Returns:
0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_SilenceDetector_GetThreshold ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
int *  threshold 
)

Get the Threshold of a SilenceDetector control.

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlsilence detector handle
thresholdsee HPI_SilenceDetector_SetThreshold()
Returns:
0 on success, or one of the HPI_ERROR_CODES.