(Page 9 of 10 in this chapter)


2.8 About Parameters

The behavior of many AG Access functions can be altered by modifying associated parameters. These parameters are grouped together into structures for convenience and efficiency. Each parameter structure has a set of default values that is sufficient for many configurations. The parameters can, however, be modified to enable or disable specific function features, or to adapt a particular function for exceptional configurations.

For example, when recording voice data, the application programmer can alter the function's behavior by modifying parameters that specify:

Record operation parameters are stored in the ADI_RECORD_PARMS structure, as shown:

typedef struct 
{ 
DWORD DTMFabort; /* abort on DTMF; see adidef.h */
INT32 gain; /* recording gain in dB */
/*-[SLC parms (used if silence det)]------ */
DWORD novoicetime; /* length of initial silence to stop */
/* recording (ms); use 0 to deactivate */
/* initial silence detection. */
DWORD silencetime; /* length of silence to stop recording */
/* after voice has been detected (ms); */
/* use 0 to deactivate. */
INT32 silenceampl; /* qualif level for silence (dBm) */
DWORD silencedeglitch; /* deglitch while qualifying silence(ms) */
/*-[Beep for record]---------------------- */
DWORD beepfreq; /* beep frequency (Hz) */
INT32 beepampl; /* beep amplitude (dBm) */
DWORD beeptime; /* beep time (ms) 0=no beep */
/*--[AGC parms]--------------------------- */
DWORD AGCenable; /* enable AGC; use 1 to activate */
INT32 AGCtargetampl; /* target AGC level (dBm) */
INT32 AGCsilenceampl; /* silence level (dBm) */
DWORD AGCattacktime; /* attack time (ms) */
DWORD AGCdecaytime; /* decay time (ms) */
} ADI_RECORD_PARMS;

If you invoke a parameter-enabled function and specify a NULL parameter pointer, AG Access uses the default values. Parameter management is discussed in greater detail in
Section 10.8.



(Page 9 of 10 in this chapter)


tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights reserved.