2.9 Parameters

(Page 10 of 11 in this chapter)
The characteristics for 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 default value that is sufficient for many configurations. The parameters can, however, be modified to achieve the following:

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

The following example is the record function parameter structure as outlined above:

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)                      				*/
    } ADIRECORD_PARMS;
If you invoke a parameter-enabled function and specify a NULL parameter pointer, AG Access uses default values. Parameter management operation and functions are discussed in Section 7.9, Parameter Management.


(Page 10 of 11 in this chapter)

Copyright 1996 Natural MicroSystems, Inc. All Rights Reserved.