(Page 50 of 80 in this chapter)


adiStartEnergyDetector

Description

Starts the energy detector.

Prototype

DWORD adiStartEnergyDetector( CTAHD ctahd,
unsigned energyqual,
unsigned silencequal,
ADI_ENERGY_PARMS *parms )

ctahd Context handle returned by adiOpenPort.

energyqual Qualification time for energy (in milliseconds).

silencequal Qualification time for silence (in milliseconds).

parms Pointer to energy detector parameter structure, as follows (NULL designates default values):

typedef struct
{      /* parameters for energy detection: */
 DWORD size;     /* size of this structure           */
 INT32 thresholdampl; /* silence level (dBm)              */
 DWORD deglitch;     /* ms deglitch during transitions   */
 DWORD autostop;     /* on detection, 1=autostop 0=don't */
} ADI_ENERGY_PARMS;

Return Values

Events

DSP File Requirement

This function requires that dtmf.dsp or dtmfe.dsp has been loaded by agmon.

Details

Starts a low-level energy detector which reports energy and silence transitions.

The thresholdampl is the dBm threshold below which is considered silence. Once energy or silence is internally qualified as "detected", the deglitch time is used during transitions above and below the threshold. The autostop field indicates that the function should stop once energy or silence is detected.

If autostop is set, ADIEVN_ENERGY_DETECT_DONE is received with the value field set to CTA_REASON_FINISHED and the size field is set to either ADIEVN_ENERGY_DETECTED or ADIEVN_SILENCE_DETECTED.

In continuous mode, ADIEVN_ENERGY_DETECTED and ADIEVN_SILENCE_DETECTED are received as the detector changes between these states.

ADIEVN_ENERGY_DETECT_DONE may also be returned with the value field set to an error or CTA_REASON_STOPPED if adiStopEnergyDetector is called.

See Also

adiStopEnergyDetector



(Page 50 of 80 in this chapter)


Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights reserved.