int sm_vmptx_generate_tones(struct sm_vmptx_generate_tones_parms *tonep)
typedef struct sm_vmptx_generate_tones_parms { tSMVMPtxId vmptx; /* in */ tSM_INT *tones; /* in */ tSM_INT num; /* in */ tSM_INT duration; /* in */ tSM_INT interval; /* in */ tSM_INT volume; /* in */ } SM_VMPTX_GENERATE_TONES_PARMS;
Causes a VMP[tx] to generate rfc2833 tone packets for a sequence of tones, containing num tones. Each tone will have duration duration And the interval between the tones will be interval. tones contains a list of tone identifiers for the tones to be generated, as defined in IETF RFC 2833). Both duration and interval must be given as a multiple of 10ms. The volume must be between 0 and -15 inclusive.
Note that this function by itself is not sufficient to cause the VMP[tx] to transmit RTP packets. The VMP[tx] must also have a valid datafeed which has been connected using sm_vmptx_datafeed_connect().
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody RTP processing API.