Prosody speech processing: API: sm_conf_prim_add

Prototype Definition

int sm_conf_prim_add(struct sm_conf_prim_add_parms *confp)

Parameters

*confp
a structure of the following type:
typedef struct sm_conf_prim_add_parms {
	tSMChannelId channel;					/* in */
	tSMChannelId participant;				/* in */
	tSM_INT id;						/* out */
	/* Only in Prosody version 2 (TiNG) */
	float factor;						/* in */
	/* End of part only in Prosody version 2 (TiNG) */
} SM_CONF_PRIM_ADD_PARMS;

Description

Adds a new conference participant to the set of input channels whose conferenced sum is currently being output on output channel channel. All channels in a conference must have been allocated on a single Prosody processor module.

The participant must be a channel which has been attached to conferencing with sm_conf_prim_attach() unless the conference type is kSMConfTypeStandard in which case the channel input is implicitly attached if necessary.

On return id will be set to a value between 0 and 63, this value being an identifier for this conference participant. This identifier may be used to determine if this participant is currently active in the conference (see sm_conf_prim_info()), and in the call for the participant to leave the conference (see sm_conf_prim_leave()).

Note that a particular participant input channel is assigned the same id for every conference it is added into (or cloned into) while attached. If a channel is detached and attached again, it may be allocated a different id value.

Only on Prosody version 2 (TiNG): This requires the module inchan to have been downloaded.

Only on Prosody version 2 (TiNG): If the participant has any kind of tone detection enabled through a call to sm_listen_for() then tones detected will be suppressed from entering the conference. This means that as soon as the detector discovers that a tone is present, this participant will be temporarily suspended from the conference and restored when the tone detector determines that the tone has finished. Note, however, that this may permit a very short initial burst of tone to be audible in the conference as, to keep the transmission latency low, the detector cannot rewind back to the start of a tone. Any such short burst of tone will be shorter than the tone detector's minimum tone criterion.

Fields

channel
The channel on which the conference output has been started to which a new participant is to be added.
participant
The input channel which is to be added to the conference output channel.
id
An identifier which identifies this participant.
factor (Only in Prosody version 2 (TiNG))
If this module is configured for kSMConfTypeIndividualVolume, this field contains a multiplication factor and the signal from the input channel is multiplied by this value before being added to the conference output. Note that this is a factor and not in dB. To specify a gain in dB, use factor = pow(10, dB / 20). If the module is configured for standard conferencing, this field must be zero and the input signal is not modified before being added into the conference output.

Returns

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


This function is part of the Prosody speech processing API.