int sm_path_resample(struct sm_path_resample_parms *resamplep)
typedef struct sm_path_resample_parms { tSMPathId path; /* in */ tSM_INT uprate; /* in */ tSM_INT downrate; /* in */ } SM_PATH_RESAMPLE_PARMS;
Configures sample rate conversion on a signal path. If uprate and downrate are equal, sample rate conversion is disabled. Otherwise the signal is converted to a sampling rate of uprate / downrate times the original sampling rate. For example, if uprate is two, and downrate is one, the sampling rate is doubled. To produce the best audio quality, and to use the least processor time, uprate should always be kept as small as possible. For example, uprate = 2, with downrate = 3, would decrease the sampling rate to two-thirds of the original value, but so would uprate = 4, with downrate = 6. Both the audio quality and the CPU loading will be noticeably better with uprate = 2, than with uprate = 4.
Requires the module resample.
0 if call completed successfully, otherwise a standard error.
This function is part of the Prosody signal path processing API.