Prosody RTP processing: API: sm_vmprx_config_sample_rate

Prototype Definition

int sm_vmprx_config_sample_rate(struct sm_vmprx_sample_rate_parms *sample_ratep)

Parameters

*sample_ratep
a structure of the following type:
typedef struct sm_vmprx_sample_rate_parms {
	tSMVMPrxId vmprx;					/* in */
	tSM_UT32 sample_rate;					/* in */
} SM_VMPRX_SAMPLE_RATE_PARMS;

Description

Allows an application to confgure the sample rate for output from a VMP[rx]. If no rate is configured, it defaults to 8000 samples per second. Some codecs (for example, PCMA - the G.711 A-law codec) can run at any sampling rate, other codecs are designed to run only at specific sampling rates. While the VMP[rx] may produce data at any sampling rate for any codec, running a codec at a non-standard sampling rate may result in unsatisfactory performance.

Fields

vmprx
The VMP[rx] to be configured
sample_rate
The sample rate in samples per second. The default is 8000.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody RTP processing API.