Tone Detector control
[Mixer and Controls]

The tone detector monitors its inputs for the presence of any of a number of tones. More...

Functions

HPI_ERR HPI_ToneDetector_GetFrequency (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 nIndex, HW32 *dwFrequency)
 Enumerate the detection frequencies of the tone detector control.
HPI_ERR HPI_ToneDetector_GetState (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *State)
 Get tone detector state.
HPI_ERR HPI_ToneDetector_SetEnable (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 Enable)
 Enable (or disable) a ToneDetector control.
HPI_ERR HPI_ToneDetector_GetEnable (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *Enable)
 Get the Enable state of a ToneDetector control.
HPI_ERR HPI_ToneDetector_SetEventEnable (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 EventEnable)
 Enable ToneDetector control event generation.
HPI_ERR HPI_ToneDetector_GetEventEnable (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *EventEnable)
 Get the event generation enable state of a ToneDetector control.
HPI_ERR HPI_ToneDetector_SetThreshold (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, int Threshold)
 Set the Threshold of a ToneDetector control.
HPI_ERR HPI_ToneDetector_GetThreshold (HPI_HSUBSYS *phSubSys, HPI_HCONTROL 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 HPI_ToneDetector_GetFrequency HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  nIndex,
HW32 *  dwFrequency
 

Enumerate the detection frequencies of the tone detector control.

Parameters:
phSubSys HPI subsystem handle.
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_ERROR_INVALID_CONTROL_VALUE if nIndex >= number of frequencies supported

HPI_ERR HPI_ToneDetector_GetState HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  State
 

Get tone detector state.

Parameters:
phSubSys HPI subsystem handle.
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 HPI_ToneDetector_SetEnable HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  Enable
 

Enable (or disable) a ToneDetector control.

Parameters:
phSubSys HPI subsystem handle.
hControl Handle to tone detector control.
Enable 1=enable, 0=disable

HPI_ERR HPI_ToneDetector_GetEnable HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  Enable
 

Get the Enable state of a ToneDetector control.

Parameters:
phSubSys HPI subsystem handle.
hControl Handle to tone detector control.
*Enable 1=enable, 0=disable

HPI_ERR HPI_ToneDetector_SetEventEnable HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  EventEnable
 

Enable ToneDetector control event generation.

Parameters:
phSubSys HPI subsystem handle.
hControl Handle to tone detector control.
EventEnable 1=enable, 0=disable

HPI_ERR HPI_ToneDetector_GetEventEnable HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  EventEnable
 

Get the event generation enable state of a ToneDetector control.

Parameters:
phSubSys HPI subsystem handle.
hControl Handle to tone detector control.
EventEnable 1=enable, 0=disable

HPI_ERR HPI_ToneDetector_SetThreshold HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
int  Threshold
 

Set the Threshold of a ToneDetector control.

Parameters:
phSubSys HPI subsystem handle.
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 HPI_ToneDetector_GetThreshold HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
int *  Threshold
 

Get the Threshold of a ToneDetector control.

Parameters:
phSubSys HPI subsystem handle.
hControl Handle to tone detector control.
*Threshold current threshold,
See also:
HPI_ToneDetector_SetThreshold()


Generated on Tue Nov 18 12:59:31 2008 for AudioScience HPI by  doxygen 1.4.6-NO