ASX Version4.10.32
Functions

Tone detector control functions

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

Functions

ASX32_API ASX_ERROR ASX_ToneDetector_SetEnable (ASX_HANDLE hToneDetector, const unsigned int nEnable)
 Turns the entire tone detector on and off.
ASX32_API ASX_ERROR ASX_ToneDetector_GetEnable (ASX_HANDLE hToneDetector, unsigned int *nEnable)
 Returns whether the entire tone detector is on or off.
ASX32_API ASX_ERROR ASX_ToneDetector_SetEventEnable (ASX_HANDLE hToneDetector, const unsigned int nEnable)
 Turns the event reporting function of the tone detector on and off.
ASX32_API ASX_ERROR ASX_ToneDetector_GetEventEnable (ASX_HANDLE hToneDetector, unsigned int *nEnable)
 Returns whether the event reporting function of the tone detector is on or off.
ASX32_API ASX_ERROR ASX_ToneDetector_SetThreshold (ASX_HANDLE hToneDetector, const float fThreshold)
 Sets the tone detector threshold (units of dB)
ASX32_API ASX_ERROR ASX_ToneDetector_GetThreshold (ASX_HANDLE hToneDetector, float *fThreshold)
 Gets the tone detector threshold (units of dB) with respect to full scale eg.
ASX32_API ASX_ERROR ASX_ToneDetector_GetState (ASX_HANDLE hToneDetector, unsigned int *nState)
 Gets the tone detector state.
ASX32_API ASX_ERROR ASX_ToneDetector_GetFrequency (ASX_HANDLE hToneDetector, unsigned int nIndex, unsigned int *nState)
 Gets the centre frequency of each tone detector by index.

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. Tones must have a minimum duration of 200ms before they are detected.


Function Documentation

ASX32_API ASX_ERROR ASX_ToneDetector_GetEnable ( ASX_HANDLE  hToneDetector,
unsigned int *  nEnable 
)

Returns whether the entire tone detector is on or off.

Parameters:
hToneDetectorA handle to an ASX tone detector control.
nEnableA return value of 1 implies on, while 0 implies off.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_ToneDetector_GetEventEnable ( ASX_HANDLE  hToneDetector,
unsigned int *  nEnable 
)

Returns whether the event reporting function of the tone detector is on or off.

Parameters:
hToneDetectorA handle to an ASX tone detector control.
nEnableA return value of 1 implies on, while 0 implies off.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_ToneDetector_GetFrequency ( ASX_HANDLE  hToneDetector,
unsigned int  nIndex,
unsigned int *  nState 
)

Gets the centre frequency of each tone detector by index.

This can be used to determine the meanings of the state bits.

Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_ToneDetector_GetState ( ASX_HANDLE  hToneDetector,
unsigned int *  nState 
)

Gets the tone detector state.

The state is a bitfield. Pairs of bits represent left and right channels of detectors.

Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_ToneDetector_GetThreshold ( ASX_HANDLE  hToneDetector,
float *  fThreshold 
)

Gets the tone detector threshold (units of dB) with respect to full scale eg.

-20dBFS. Tones with level above -20dBFs threshold are detected Tones must have a minimum duration of 200ms before they are detected.

Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_ToneDetector_SetEnable ( ASX_HANDLE  hToneDetector,
const unsigned int  nEnable 
)

Turns the entire tone detector on and off.

Parameters:
hToneDetectorA handle to an ASX tone detector control.
nEnableA value of 1 enables the tone detector and a value of 0 disables it.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_ToneDetector_SetEventEnable ( ASX_HANDLE  hToneDetector,
const unsigned int  nEnable 
)

Turns the event reporting function of the tone detector on and off.

Parameters:
hToneDetectorA handle to an ASX tone detector control.
nEnableA value of 1 enables the tone detector event reporting and a value of 0 disables it.
Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.
ASX32_API ASX_ERROR ASX_ToneDetector_SetThreshold ( ASX_HANDLE  hToneDetector,
const float  fThreshold 
)

Sets the tone detector threshold (units of dB)

Returns:
Returns 0 if there is no error, otherwise one of asxERROR is returned.