int sm_channel_set_output_rate(struct sm_channel_set_output_rate_parms *ratep)
typedef struct sm_channel_set_output_rate_parms { tSMChannelId channel; /* in */ tSM_INT sample_rate; /* in */ } SM_CHANNEL_SET_OUTPUT_RATE_PARMS;
Configures the sample rate (in samples per second) to be used by the output half of a channel.
The sample rate should be configured before using the channel for any operation (such as replay) which depends on it. otherwise it will default to 8000 samples per second.
If a channel is connected to a timeslot using sm_switch_channel_output() the sample rate must be 8000, whether set explicitly or allowed to default to 8000.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody generic API.