SMsetcodec
Previous Topic  Next Topic 

Synopsis:

       SMsetcodec(vmp_chan,array_index,codecID[,vad[,fpp[,options]]])

)


Arguments:

       vmp_chan                 The VMP channel handle (as returned from SMcreateVMP())

         array_index                - Index of element in the codec array to set

         codecID                - The Id of the codec to set in the codec array

       vad                        -  (Optional) Turn Voice Activity Detection on or off (0=Off)

       fpp                        -  (Optional) number of frames per packet

       options                -  (Optional) options


Description:   This function allows elements of the array of supported codecs to be set on the VMP specified by vmp_chan.

Each VMP channel has an array of up to 11 codecs which it can accept which are indexed from 0 through to 10 by the array_index argument.


The codecID should be set to one of the following values as specified in aculab.inc:


const        NOT_INITIALISED                =        0;

const        G711_ALAW                 =        1;

const        G711_ULAW                 =        2;

const        G723                                =        3;

const        G729                                =        4;

const        G729A                                =        5;

const        T38                                =        6;

const        G726                                =        7;

const        GSM_FR                        =        8;

const        iLBC                                =        9;

const        RFC4040                        =        10;

const        G728                                =        11;

const        AMR_NB                        =        12;

const        AMR_WB                        =        13;

const        EVRC                                =        14;

const        EVRC0                                =        15;                // headerless EVRC

const        SMV                                =        16;

const        SMV0                                =        17;                // headerless SMV



If no valid codecs are specified then the system codec list will be used.   If this also contains no

valid codecs then calls will be failed with a parameter error.



The optional vad argument allows the voice activity detector to be turned on for this call.    Turning on the voice activity   detector allows the IP Telephony card to perform silence suppression for that call.   Permitted values are :


const VAD_ON= 1;

const VAD_OFF= 0;


The optional fpp can be used in API calls, prior to call connection, to specify the actual number of frames per

packet. The minimum value is 1 and the maximum value is 3, with the default being 2 frames per packet.


The optional options argument is not currently used and will be ignored.


Returns:   0 upon success or a negative error code.