This function is only in Prosody version 1 (see also the conversion guide for further details).
int sm_find_channel(struct sm_find_channel_parms *findp)
typedef struct sm_find_channel_parms {
tSM_INT is_output; /* in */
tSM_INT st; /* in */
tSM_INT ts; /* in */
tSM_INT card; /* in */
tSM_INT from_ix; /* inout */
tSMChannelId channel; /* out */
tSM_INT channel_ix; /* out */
} SM_FIND_CHANNEL_PARMS;
Given the switching location < card, st, ts > (see sm_channel_info()) of either channel's input (is_output set to zero) or output (is_output set to non-zero), returns both channel identifier (in channel) and channel index (in channel_ix - see sm_get_channel_ix()).
Normally the from_ix parameter should be set to zero before invoking this function, and the first channel corresponding to the switching location will be found. If a switching location potentially has multiple associated channels (for example multiple input channels having data switched from the same external bus location), then this function may be used to find all the associated channels if the application invokes sm_find_channel() first with from_ix set to zero, then subsequently with from_ix set to one plus the returned channel_ix from the previous call to sm_find_channel().
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody generic API.