The tone detector monitors its inputs for the presence of any of a number of tones.
More...
Functions |
hpi_err_t | HPI_ToneDetector_GetFrequency (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t nIndex, uint32_t *dwFrequency) |
| Enumerate the detection frequencies of the tone detector control.
|
hpi_err_t | HPI_ToneDetector_GetState (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *state) |
| Get tone detector state.
|
hpi_err_t | HPI_ToneDetector_SetEnable (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t enable) |
| Enable (or disable) a ToneDetector control.
|
hpi_err_t | HPI_ToneDetector_GetEnable (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *enable) |
| Get the Enable state of a ToneDetector control.
|
hpi_err_t | HPI_ToneDetector_SetEventEnable (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t EventEnable) |
| Enable ToneDetector control event generation.
|
hpi_err_t | HPI_ToneDetector_GetEventEnable (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *EventEnable) |
| Get the event generation enable state of a ToneDetector control.
|
hpi_err_t | HPI_ToneDetector_SetThreshold (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, int threshold) |
| Set the Threshold of a ToneDetector control.
|
hpi_err_t | HPI_ToneDetector_GetThreshold (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, int *threshold) |
| Get the Threshold of a ToneDetector control.
|
Detailed Description
The tone detector monitors its inputs for the presence of any of a number of tones.
Currently 25Hz and 35Hz tones can be detected independently on left and right channels. Tones that exceed the threshold set by HPI_ToneDetector_SetThreshold() are detected. The result of the detection is reflected in the controls state, and optionally by sending an async event with the new state.
Function Documentation
hpi_err_t HPI_ToneDetector_GetFrequency |
( |
const hpi_hsubsys_t * |
phSubSys, |
|
|
hpi_handle_t |
hControl, |
|
|
uint32_t |
nIndex, |
|
|
uint32_t * |
dwFrequency |
|
) |
| |
Enumerate the detection frequencies of the tone detector control.
- Parameters:
-
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to tone detector control. |
nIndex | iterate this from zero to get detector frequencies in *dwFreqency |
*dwFrequency | detection frequency of tone detector band number nIndex |
- Returns:
- 0 on success, or one of the HPI_ERROR_CODES.
- Return values:
-
hpi_err_t HPI_ToneDetector_GetState |
( |
const hpi_hsubsys_t * |
phSubSys, |
|
|
hpi_handle_t |
hControl, |
|
|
uint32_t * |
state |
|
) |
| |
Get tone detector state.
- Parameters:
-
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to tone detector control. |
*state | Tonedetector state reflected in the bits of *State. Upper 16 bits is right channel, lower 16 bits is left channel. LSB represents lowest frequency detector (25Hz) |
- Returns:
- 0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_ToneDetector_SetEnable |
( |
const hpi_hsubsys_t * |
phSubSys, |
|
|
hpi_handle_t |
hControl, |
|
|
uint32_t |
enable |
|
) |
| |
Enable (or disable) a ToneDetector control.
- Parameters:
-
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to tone detector control. |
enable | 1=enable, 0=disable |
hpi_err_t HPI_ToneDetector_GetEnable |
( |
const hpi_hsubsys_t * |
phSubSys, |
|
|
hpi_handle_t |
hControl, |
|
|
uint32_t * |
enable |
|
) |
| |
Get the Enable state of a ToneDetector control.
- Parameters:
-
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to tone detector control. |
*enable | 1=enable, 0=disable |
hpi_err_t HPI_ToneDetector_SetEventEnable |
( |
const hpi_hsubsys_t * |
phSubSys, |
|
|
hpi_handle_t |
hControl, |
|
|
uint32_t |
EventEnable |
|
) |
| |
Enable ToneDetector control event generation.
- Parameters:
-
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to tone detector control. |
EventEnable | 1=enable, 0=disable |
hpi_err_t HPI_ToneDetector_GetEventEnable |
( |
const hpi_hsubsys_t * |
phSubSys, |
|
|
hpi_handle_t |
hControl, |
|
|
uint32_t * |
EventEnable |
|
) |
| |
Get the event generation enable state of a ToneDetector control.
- Parameters:
-
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to tone detector control. |
EventEnable | 1=enable, 0=disable |
hpi_err_t HPI_ToneDetector_SetThreshold |
( |
const hpi_hsubsys_t * |
phSubSys, |
|
|
hpi_handle_t |
hControl, |
|
|
int |
threshold |
|
) |
| |
Set the Threshold of a ToneDetector control.
- Parameters:
-
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to tone detector control. |
threshold | in millibels wrt full scale. E.g. -2000 -> -20dBFS threshold. Tones with level above this threshold are detected. |
- Returns:
- 0 on success, or one of the HPI_ERROR_CODES.
hpi_err_t HPI_ToneDetector_GetThreshold |
( |
const hpi_hsubsys_t * |
phSubSys, |
|
|
hpi_handle_t |
hControl, |
|
|
int * |
threshold |
|
) |
| |
Get the Threshold of a ToneDetector control.
- Parameters:
-
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to tone detector control. |
*threshold | current threshold, |
- See also:
- HPI_ToneDetector_SetThreshold()