Prosody speech processing: API: sm_channel_set_output_threshold

Prototype Definition

int sm_channel_set_output_threshold(struct sm_channel_set_output_threshold_parms *thp)

Parameters

*thp
a structure of the following type:
typedef struct sm_channel_set_output_threshold_parms {
	tSMChannelId channel;					/* in */
	tSM_INT minimum_bits;					/* in */
} SM_CHANNEL_SET_OUTPUT_THRESHOLD_PARMS;

Description

A channel is considered to be ready for you to supply data to it when there is enough space. This call allows you to specify how much is 'enough'.

While there is enough space for more data to make a channel ready, the channel's associated write event (as configured with sm_channel_set_event()) remains set.

See also the document Prosody application note: considerations for data transfer thresholds.

Fields

channel
The channel whose threshold is to be set.
minimum_bits
The new threshold. If the threshold is greater than zero when this much space available for new data, the channel is ready. If it is less than zero, channel becomes ready when the amount of buffered data falls below that value. For example, the value -1024 means that notification is to happen when only 128 octets (1024 bits) of data is waiting to be sent.

Returns

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


This function is part of the Prosody speech processing API.