- 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:
- The gain applied to the input voice signal.
- An initial timeout period, during which the caller must start speaking or the
record operation will terminate.
- The amount of silence that is allowed to elapse after a caller has stopped
speaking before the record operation will terminate.
- The record beep frequency, amplitude, and duration.
- The automatic gain control settings.
- 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.