Prosody generic: API: sm_switch_channel_ix

This function is only in Prosody version 1 (see also the conversion guide for further details).

Prototype Definition

int sm_switch_channel_ix(struct sm_switch_channel_ix_parms *switchp)

Parameters

*switchp
a structure of the following type:
typedef struct sm_switch_channel_ix_parms {
	tSM_INT channel_ix;					/* in */
	tSM_INT st;						/* in */
	tSM_INT ts;						/* in */
	tSM_INT switch_output;					/* in */
} SM_SWITCH_CHANNEL_IX_PARMS;

Description

An application may use this call as an alternative to sm_switch_channel_input() or sm_switch_channel_output() in the case where the subject channel needs to be referred to by a channel index and not a channel id (for instance when the part of the application handling switching of data to channels is located in a process distinct from that where the channels were allocated and thus the channel ids are not be valid in this process).

Applicable only to channels located on Prosody ISA card speech processing modules.

If switch_output is non-zero and channel_ix is set to the channel index for the channel to be switched, then sm_switch_channel_ix will behave like sm_switch_channel_output().

If switch_output is zero and channel_ix is set to the channel index for the channel to be switched, then sm_switch_channel_ix will behave like sm_switch_channel_input().

Fields

channel_ix (Only in Prosody version 1)
The index numberof the channel to operate on.
st (Only in Prosody version 1)
The source or destination stream.
ts (Only in Prosody version 1)
The source or destination timeslot.
switch_output (Only in Prosody version 1)
Selects whether input (0) or output (non-zero) is to be switched.

Returns

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


This function is part of the Prosody generic API.